2023-02-27
功能完善
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
async sysInfoMethod() {
|
async sysInfoMethod() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let list = await Api.apiCall('get', Api.index.sysInfo, params);
|
let list = await Api.apiCall('get', Api.index.sysInfo, params);
|
||||||
|
console.log('sysInfo>>>>>',sysInfo)
|
||||||
this.$db.set('sysInfo', list)
|
this.$db.set('sysInfo', list)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -5,11 +5,11 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseUrl = "http://localhost:7001/";
|
// baseUrl = "http://localhost:7001/";
|
||||||
// socketUrl = "ws://localhost:8001/";
|
// socketUrl = "ws://localhost:8001/";
|
||||||
// baseUrl = "http://26077a35f5.wicp.vip:43609/";
|
// baseUrl = "http://26077a35f5.wicp.vip:43609/";
|
||||||
baseUrl = "http://www.yyundong.com:8083/";
|
baseUrl = "http://mall.yyundong.com/portalapi/api/";
|
||||||
socketUrl = "ws://8192.168.43.195:8083/";
|
socketUrl = "ws://8192.168.43.195:8083/";
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} 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/";
|
// baseUrl = "http://192.168.43.195:8083/";
|
||||||
socketUrl = "ws://192.168.43.195:8083/";
|
socketUrl = "ws://192.168.43.195:8083/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "汇融云链",
|
"name" : "汇融云链",
|
||||||
"appid" : "__UNI__FB2C9C4",
|
"appid" : "__UNI__FB2C9C4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.0.0.0",
|
"versionName" : "1.0.0.2",
|
||||||
"versionCode" : 4000,
|
"versionCode" : 1002,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
"permission" : {}
|
"permission" : {}
|
||||||
},
|
},
|
||||||
"h5" : {
|
"h5" : {
|
||||||
"title" : "宇运动商城",
|
"title" : "汇融云链",
|
||||||
"domain" : "https://www.yyundong.com:8088/h5",
|
"domain" : "https://www.yyundong.com:8088/h5",
|
||||||
"router" : {
|
"router" : {
|
||||||
"base" : ""
|
"base" : ""
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"type": "transparent",
|
"type": "transparent",
|
||||||
"searchInput": {
|
// "searchInput": {
|
||||||
"backgroundColor": "rgba(231, 231, 231,.7)",
|
// "backgroundColor": "rgba(231, 231, 231,.7)",
|
||||||
"borderRadius": "16px",
|
// "borderRadius": "16px",
|
||||||
"placeholder": "请输入要查询的信息",
|
// "placeholder": "请输入要查询的信息",
|
||||||
"disabled": true,
|
// "disabled": true,
|
||||||
"placeholderColor": "#606266"
|
// "placeholderColor": "#606266"
|
||||||
}
|
// }
|
||||||
,
|
// ,
|
||||||
"buttons": [{
|
"buttons": [{
|
||||||
"fontSrc": "/static/yticon.ttf",
|
"fontSrc": "/static/yticon.ttf",
|
||||||
"text": "",
|
"text": "",
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/index/user",
|
"path": "pages/index/user",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的云链",
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
// #endif
|
// #endif
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
"type": "transparent",
|
"type": "transparent",
|
||||||
"buttons": [{
|
"buttons": [{
|
||||||
"fontSrc": "/static/yticon.ttf",
|
"fontSrc": "/static/yticon.ttf",
|
||||||
"text": "\ue60f",
|
"text": "",
|
||||||
"fontSize": "24",
|
"fontSize": "24",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"width": "46px",
|
"width": "46px",
|
||||||
@@ -190,11 +190,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fontSrc": "/static/yticon.ttf",
|
"fontSrc": "/static/yticon.ttf",
|
||||||
"text": "\ue744",
|
"text": "",
|
||||||
"fontSize": "28",
|
"fontSize": "28",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"background": "rgba(0,0,0,0)",
|
"background": "rgba(0,0,0,0)"
|
||||||
"redDot": true
|
// "redDot": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -809,7 +809,7 @@
|
|||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "宇运动商城",
|
"navigationBarTitleText": "汇融云链",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"backgroundColor": "#f8f8f8"
|
"backgroundColor": "#f8f8f8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
mapState
|
mapState
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
import navBar from '@/components/zhouWei-navBar';
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
coupon,
|
coupon,
|
||||||
@@ -390,11 +390,14 @@
|
|||||||
|
|
||||||
async sysInfoMethod() {
|
async sysInfoMethod() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let list = this.$db.get('sysInfo')
|
// let list = this.$db.get('sysInfo')
|
||||||
if (!list) {
|
console.log('sysInfo>>>>>1111111111111', 1111111111111111)
|
||||||
|
// if (!list) {
|
||||||
|
|
||||||
list = await Api.apiCall('get', Api.index.sysInfo, params);
|
list = await Api.apiCall('get', Api.index.sysInfo, params);
|
||||||
|
console.log('sysInfo>>>>>2222222222', sysInfo)
|
||||||
this.$db.set('sysInfo', list)
|
this.$db.set('sysInfo', list)
|
||||||
}
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 uniIcon from '@/components/uni-icon/uni-icon.vue';
|
||||||
import eonfox from '@/components/eonfox/eonfox.js';
|
import eonfox from '@/components/eonfox/eonfox.js';
|
||||||
import fns from '@/components/eonfox/fns.js';
|
import fns from '@/components/eonfox/fns.js';
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="vip-card-box" @click="toNav('../../pagesU/user/applyMember')"> -->
|
<!-- <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>
|
<image class="card-bg" src="/static/vip-card-bg.png" mode=""></image>
|
||||||
<view class="b-btn">立即升级</view>
|
<view class="b-btn">立即升级</view>
|
||||||
<view class="tit" v-if="userDetailInfo">
|
<view class="tit" v-if="userDetailInfo">
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text class="e-m">汇融云链</text>
|
<text class="e-m">汇融云链</text>
|
||||||
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
|
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cover-container" :style="[
|
<view class="cover-container" :style="[
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
<text class="num">{{ couponList.length || 0 }}</text>
|
<text class="num">{{ couponList.length || 0 }}</text>
|
||||||
<text>优惠券</text>
|
<text>优惠券</text>
|
||||||
</view>
|
</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 class="num">{{ userDetailInfo.integration || 0 }}</text>
|
||||||
<text>积分</text>
|
<text>积分</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单 -->
|
<!-- 订单 -->
|
||||||
<view class="order-section">
|
<view class="order-section">
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import Json from '@/Json';
|
import Json from '@/Json';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
|
|||||||
@@ -1,33 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<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-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('../../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-tit">收货地址</text>
|
||||||
<text class="cell-more yticon icon-you"></text>
|
<text class="cell-more yticon icon-you"></text>
|
||||||
</view>
|
</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-tit">实名认证</text>
|
||||||
<text class="cell-more yticon icon-you"></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>
|
<text class="cell-tit">消息推送</text>
|
||||||
<switch checked color="#fa436a" @change="switchChange" />
|
<switch checked color="#fa436a" @change="switchChange" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell m-t b-b" @click="navTo('清除缓存')" hover-class="cell-hover" :hover-stay-time="50">
|
<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-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">v {{version}}</text>
|
||||||
<text class="cell-more yticon icon-you"></text>
|
<text class="cell-more yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
|
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
|
||||||
@@ -38,8 +40,12 @@
|
|||||||
<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 { mapMutations } from 'vuex';
|
import {
|
||||||
import APPUpdate from '../../plugins/APPUpdate/index.js'
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
|
import APPUpdate, {
|
||||||
|
getCurrentNo
|
||||||
|
} from '../../plugins/APPUpdate/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -47,12 +53,17 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sysInfo: '',
|
versionCode: "",
|
||||||
userInfo:{}
|
version: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.sysInfo = this.$db.get('sysInfo');
|
let that = this;
|
||||||
|
getCurrentNo(version => {
|
||||||
|
that.version = version.version
|
||||||
|
console.log("qqqq", that.version)
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['logout']),
|
...mapMutations(['logout']),
|
||||||
@@ -61,7 +72,7 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
this.$api.msg(`跳转到${url}`);
|
// this.$api.msg(`跳转到${url}`);
|
||||||
},
|
},
|
||||||
//退出登录
|
//退出登录
|
||||||
toLogout() {
|
toLogout() {
|
||||||
@@ -70,7 +81,6 @@ export default {
|
|||||||
success: e => {
|
success: e => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
this.logout();
|
this.logout();
|
||||||
this.$db.del('userInfos');
|
|
||||||
this.$db.del('token');
|
this.$db.del('token');
|
||||||
Api.apiCall('post', Api.index.logout, {});
|
Api.apiCall('post', Api.index.logout, {});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -86,6 +96,7 @@ export default {
|
|||||||
this.$api.msg(`${statusTip}消息推送`);
|
this.$api.msg(`${statusTip}消息推送`);
|
||||||
},
|
},
|
||||||
updateApp() {
|
updateApp() {
|
||||||
|
console.log("qqqq", 11111111111111111);
|
||||||
// true 没有新版本的时候有提示,默认:false
|
// true 没有新版本的时候有提示,默认:false
|
||||||
APPUpdate(true);
|
APPUpdate(true);
|
||||||
}
|
}
|
||||||
@@ -97,6 +108,7 @@ export default {
|
|||||||
page {
|
page {
|
||||||
background: $page-color-base;
|
background: $page-color-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-cell {
|
.list-cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
@@ -105,43 +117,52 @@ page {
|
|||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
&.log-out-btn {
|
&.log-out-btn {
|
||||||
margin-top: 40upx;
|
margin-top: 40upx;
|
||||||
border-radius: 50upx;
|
border-radius: 50upx;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin-left: 2.5%;
|
margin-left: 2.5%;
|
||||||
background: $uni-color-primary;
|
background: $uni-color-primary;
|
||||||
|
|
||||||
.cell-tit {
|
.cell-tit {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.cell-hover {
|
&.cell-hover {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.b-b:after {
|
&.b-b:after {
|
||||||
left: 30upx;
|
left: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.m-t {
|
&.m-t {
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-more {
|
.cell-more {
|
||||||
align-self: baseline;
|
align-self: baseline;
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-tit {
|
.cell-tit {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
margin-right: 10upx;
|
margin-right: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-tip {
|
.cell-tip {
|
||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
transform: translateX(16upx) scale(0.84);
|
transform: translateX(16upx) scale(0.84);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
mapState
|
mapState
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
import navBar from '@/components/zhouWei-navBar';
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
coupon,
|
coupon,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
<view class="carousel">
|
<view class="carousel">
|
||||||
<swiper indicator-dots circular="true" duration="400">
|
<swiper indicator-dots circular="true" duration="400">
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in small" :key="index">
|
<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-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -12,12 +14,14 @@
|
|||||||
<text class="title">{{ goods.name }}</text>
|
<text class="title">{{ goods.name }}</text>
|
||||||
<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"
|
||||||
<text class="price" v-else-if="!goods.vipPrice">惠农价¥{{ goods.originalPrice }}</text>
|
v-if="goods.vipPrice && goods.vipPrice > 0">惠农价¥{{ (goods.price * goods.memberRate) / 10 }}</text> -->
|
||||||
<text class="m-price" v-if="!goods.vipPrice">市场价¥{{ goods.price }}</text>
|
<text class="price" >惠农价¥{{ goods.originalPrice }}</text>
|
||||||
<text class="m-price" v-else-if="goods.vipPrice && goods.vipPrice > 0">¥{{ goods.price }}</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="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">
|
||||||
<text>销量: {{ goods.sale }}</text>
|
<text>销量: {{ goods.sale }}</text>
|
||||||
@@ -25,7 +29,7 @@
|
|||||||
<text>浏览量: {{ goods.hit }}</text>
|
<text>浏览量: {{ goods.hit }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="share-section" @click="navToTabPageStore(goods.storeId)">
|
<!-- <view class="share-section" @click="navToTabPageStore(goods.storeId)">
|
||||||
<view class="share-icon">
|
<view class="share-icon">
|
||||||
<text class="yticon icon-xingxing"></text>
|
<text class="yticon icon-xingxing"></text>
|
||||||
铺
|
铺
|
||||||
@@ -39,7 +43,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--分享-->
|
<!--分享-->
|
||||||
<view class="share-section" @click="share">
|
<!-- <view class="share-section" @click="share">
|
||||||
<view class="share-icon">
|
<view class="share-icon">
|
||||||
<text class="yticon icon-xingxing"></text>
|
<text class="yticon icon-xingxing"></text>
|
||||||
返
|
返
|
||||||
@@ -50,13 +54,14 @@
|
|||||||
立即分享
|
立即分享
|
||||||
<text class="yticon icon-you"></text>
|
<text class="yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="c-list">
|
<view class="c-list">
|
||||||
<view class="c-row b-b" v-if="skuList && skuList.length > 0" @click="toggleSpec">
|
<view class="c-row b-b" v-if="skuList && skuList.length > 0" @click="toggleSpec">
|
||||||
<text class="tit">规格</text>
|
<text class="tit">规格</text>
|
||||||
<view class="con">
|
<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>
|
</view>
|
||||||
<text class="yticon icon-you"></text>
|
<text class="yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
@@ -124,8 +129,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="action-btn-group">
|
<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 add-cart-btn" @click="addCart(goods)">加入购物车</button>
|
||||||
|
<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(goods)">立即购买</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -161,21 +166,17 @@
|
|||||||
<text class="stock">库存:{{ sku.stock }}件</text>
|
<text class="stock">库存:{{ sku.stock }}件</text>
|
||||||
<view class="selected">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view v-for="(item, index) in specList" :key="index" class="attr-list">
|
<view v-for="(item, index) in specList" :key="index" class="attr-list">
|
||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
<view class="item-list">
|
<view class="item-list">
|
||||||
<text
|
<text v-for="(childItem, childIndex) in specChildList" v-if="childItem.pid === item.id"
|
||||||
v-for="(childItem, childIndex) in specChildList"
|
:key="childIndex" class="tit" :class="{ selected: childItem.selected }"
|
||||||
v-if="childItem.pid === item.id"
|
@click="selectSpec(childIndex, childItem.pid)">
|
||||||
:key="childIndex"
|
|
||||||
class="tit"
|
|
||||||
:class="{ selected: childItem.selected }"
|
|
||||||
@click="selectSpec(childIndex, childItem.pid)"
|
|
||||||
>
|
|
||||||
{{ childItem.name }}
|
{{ childItem.name }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -192,8 +193,12 @@
|
|||||||
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 share from '@/components/share';
|
import share from '@/components/share';
|
||||||
import { mapState } from 'vuex';
|
import {
|
||||||
import { formatDate } from '@/common/date';
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -221,8 +226,7 @@ export default {
|
|||||||
general: 0,
|
general: 0,
|
||||||
goods: 0
|
goods: 0
|
||||||
},
|
},
|
||||||
imgList: [
|
imgList: [{
|
||||||
{
|
|
||||||
src: 'https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg'
|
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;
|
let id = ops.id;
|
||||||
if (id) {
|
if (id) {
|
||||||
this.logining = true;
|
this.logining = true;
|
||||||
let params = { id: ops.id };
|
let params = {
|
||||||
|
id: ops.id
|
||||||
|
};
|
||||||
let data = await Api.apiCall('get', Api.goods.goodsDetail, params);
|
let data = await Api.apiCall('get', Api.goods.goodsDetail, params);
|
||||||
this.logining = false;
|
this.logining = false;
|
||||||
|
|
||||||
@@ -292,10 +298,15 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.hasLogin) {
|
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);
|
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);
|
let consoltL = await Api.apiCall('get', Api.goods.consultList, params1);
|
||||||
this.consultList = consoltL.list;
|
this.consultList = consoltL.list;
|
||||||
this.consultCount = consoltL.count;
|
this.consultCount = consoltL.count;
|
||||||
@@ -327,7 +338,8 @@ export default {
|
|||||||
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
|
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
|
||||||
this.sku = item;
|
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;
|
this.sku = item;
|
||||||
}
|
}
|
||||||
if (!this.sku.pic) {
|
if (!this.sku.pic) {
|
||||||
@@ -363,11 +375,13 @@ export default {
|
|||||||
return match;
|
return match;
|
||||||
});
|
});
|
||||||
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
|
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;
|
return match;
|
||||||
});
|
});
|
||||||
newContent = newContent.replace(/<br[^>]*\/>/gi, '');
|
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;
|
return newContent;
|
||||||
} else {
|
} else {
|
||||||
return '暂无商品详情';
|
return '暂无商品详情';
|
||||||
@@ -406,7 +420,9 @@ export default {
|
|||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
|
|
||||||
let params = { couponId: index.id };
|
let params = {
|
||||||
|
couponId: index.id
|
||||||
|
};
|
||||||
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -459,12 +475,15 @@ export default {
|
|||||||
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
|
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
|
||||||
this.sku = item;
|
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;
|
this.sku = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!this.sku) {
|
if (!this.sku) {
|
||||||
uni.showToast({ title: '商品不存在!' });
|
uni.showToast({
|
||||||
|
title: '商品不存在!'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (!this.sku.pic) {
|
if (!this.sku.pic) {
|
||||||
this.sku.pic = this.goods.pic;
|
this.sku.pic = this.goods.pic;
|
||||||
@@ -494,7 +513,14 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.favorite = !this.favorite;
|
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);
|
Api.apiCall('post', Api.goods.favoriteSave, params);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -508,7 +534,9 @@ export default {
|
|||||||
}
|
}
|
||||||
let userInfo = uni.getStorageSync('userInfo');
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
||||||
uni.showToast({ title: '不能购买自己店铺的商品!' });
|
uni.showToast({
|
||||||
|
title: '不能购买自己店铺的商品!'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data;
|
let data;
|
||||||
@@ -518,10 +546,15 @@ export default {
|
|||||||
console.log(this.sku);
|
console.log(this.sku);
|
||||||
console.log(this.sku.stock);
|
console.log(this.sku.stock);
|
||||||
if (this.sku.stock < 1) {
|
if (this.sku.stock < 1) {
|
||||||
uni.showToast({ title: '库存不够!' });
|
uni.showToast({
|
||||||
|
title: '库存不够!'
|
||||||
|
});
|
||||||
return;
|
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);
|
// data = await Api.apiCall('post', Api.order.addCart, params);
|
||||||
let dataJson = {};
|
let dataJson = {};
|
||||||
|
|
||||||
@@ -536,10 +569,14 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.goods.stock < 1) {
|
if (this.goods.stock < 1) {
|
||||||
uni.showToast({ title: '库存不够!' });
|
uni.showToast({
|
||||||
|
title: '库存不够!'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let params = { goodsId: id };
|
let params = {
|
||||||
|
goodsId: id
|
||||||
|
};
|
||||||
// data = await Api.apiCall('post', Api.order.addCart, params);
|
// data = await Api.apiCall('post', Api.order.addCart, params);
|
||||||
let dataJson = {};
|
let dataJson = {};
|
||||||
|
|
||||||
@@ -566,7 +603,9 @@ export default {
|
|||||||
console.log(userInfo);
|
console.log(userInfo);
|
||||||
console.log(this.goods.storeId);
|
console.log(this.goods.storeId);
|
||||||
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
||||||
uni.showToast({ title: '不能购买自己店铺的商品!' });
|
uni.showToast({
|
||||||
|
title: '不能购买自己店铺的商品!'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let id = item.id;
|
let id = item.id;
|
||||||
@@ -574,17 +613,26 @@ export default {
|
|||||||
|
|
||||||
if (this.sku && this.sku.id) {
|
if (this.sku && this.sku.id) {
|
||||||
if (this.sku.stock < 1) {
|
if (this.sku.stock < 1) {
|
||||||
uni.showToast({ title: '库存不够!' });
|
uni.showToast({
|
||||||
|
title: '库存不够!'
|
||||||
|
});
|
||||||
return;
|
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);
|
data = await Api.apiCall('post', Api.order.addCart, params);
|
||||||
} else {
|
} else {
|
||||||
if (this.goods.stock < 1) {
|
if (this.goods.stock < 1) {
|
||||||
uni.showToast({ title: '库存不够!' });
|
uni.showToast({
|
||||||
|
title: '库存不够!'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let params = { goodsId: id };
|
let params = {
|
||||||
|
goodsId: id
|
||||||
|
};
|
||||||
data = await Api.apiCall('post', Api.order.addCart, params);
|
data = await Api.apiCall('post', Api.order.addCart, params);
|
||||||
}
|
}
|
||||||
console.log("data=========:" + data)
|
console.log("data=========:" + data)
|
||||||
@@ -604,26 +652,32 @@ page {
|
|||||||
background: $page-color-base;
|
background: $page-color-base;
|
||||||
padding-bottom: 160upx;
|
padding-bottom: 160upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-you {
|
.icon-you {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel {
|
.carousel {
|
||||||
height: 722upx;
|
height: 722upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
swiper {
|
swiper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-wrapper {
|
.image-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
height: 750upx;
|
height: 750upx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -642,6 +696,7 @@ page {
|
|||||||
height: 50upx;
|
height: 50upx;
|
||||||
line-height: 50upx;
|
line-height: 50upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-box {
|
.price-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
@@ -650,13 +705,16 @@ page {
|
|||||||
font-size: 26upx;
|
font-size: 26upx;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-lg + 2upx;
|
font-size: $font-lg + 2upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
margin: 0 12upx;
|
margin: 0 12upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-tip {
|
.coupon-tip {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 4upx 10upx;
|
padding: 4upx 10upx;
|
||||||
@@ -667,17 +725,20 @@ page {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
transform: translateY(-4upx);
|
transform: translateY(-4upx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot-row {
|
.bot-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 50upx;
|
height: 50upx;
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 分享 */
|
/* 分享 */
|
||||||
.share-section {
|
.share-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -685,6 +746,7 @@ page {
|
|||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
background: linear-gradient(left, #fdf5f6, #fbebf6);
|
background: linear-gradient(left, #fdf5f6, #fbebf6);
|
||||||
padding: 12upx 30upx;
|
padding: 12upx 30upx;
|
||||||
|
|
||||||
.share-icon {
|
.share-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -697,6 +759,7 @@ page {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 22upx;
|
font-size: 22upx;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 50upx;
|
width: 50upx;
|
||||||
@@ -708,6 +771,7 @@ page {
|
|||||||
background: $uni-color-primary;
|
background: $uni-color-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-xingxing {
|
.icon-xingxing {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -717,21 +781,25 @@ page {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-bangzhu1 {
|
.icon-bangzhu1 {
|
||||||
padding: 10upx;
|
padding: 10upx;
|
||||||
font-size: 30upx;
|
font-size: 30upx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-btn {
|
.share-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-you {
|
.icon-you {
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
margin-left: 4upx;
|
margin-left: 4upx;
|
||||||
@@ -743,31 +811,38 @@ page {
|
|||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.c-row {
|
.c-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20upx;
|
padding: 20upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
width: 140upx;
|
width: 140upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
.selected-text {
|
.selected-text {
|
||||||
margin-right: 10upx;
|
margin-right: 10upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bz-list {
|
.bz-list {
|
||||||
height: 40upx;
|
height: 40upx;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 30upx;
|
margin-right: 30upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.con-list {
|
.con-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -775,6 +850,7 @@ page {
|
|||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
line-height: 40upx;
|
line-height: 40upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
@@ -787,35 +863,42 @@ page {
|
|||||||
padding: 20upx;
|
padding: 20upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
|
|
||||||
.e-header {
|
.e-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 70upx;
|
height: 70upx;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
margin-right: 4upx;
|
margin-right: 4upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-you {
|
.icon-you {
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.eva-box {
|
.eva-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
|
|
||||||
.portrait {
|
.portrait {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 80upx;
|
width: 80upx;
|
||||||
height: 80upx;
|
height: 80upx;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -823,11 +906,13 @@ page {
|
|||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
padding-left: 26upx;
|
padding-left: 26upx;
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot {
|
.bot {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -836,11 +921,13 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 详情 */
|
/* 详情 */
|
||||||
.detail-desc {
|
.detail-desc {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.d-header {
|
.d-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -856,6 +943,7 @@ page {
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -872,8 +960,10 @@ page {
|
|||||||
/* 规格选择弹窗 */
|
/* 规格选择弹窗 */
|
||||||
.attr-content {
|
.attr-content {
|
||||||
padding: 10upx 30upx;
|
padding: 10upx 30upx;
|
||||||
|
|
||||||
.a-t {
|
.a-t {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 170upx;
|
width: 170upx;
|
||||||
height: 170upx;
|
height: 170upx;
|
||||||
@@ -881,6 +971,7 @@ page {
|
|||||||
margin-top: -40upx;
|
margin-top: -40upx;
|
||||||
border-radius: 8upx;
|
border-radius: 8upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -888,16 +979,19 @@ page {
|
|||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
line-height: 42upx;
|
line-height: 42upx;
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
margin-bottom: 10upx;
|
margin-bottom: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-text {
|
.selected-text {
|
||||||
margin-right: 10upx;
|
margin-right: 10upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attr-list {
|
.attr-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -906,10 +1000,12 @@ page {
|
|||||||
padding-top: 30upx;
|
padding-top: 30upx;
|
||||||
padding-left: 10upx;
|
padding-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-list {
|
.item-list {
|
||||||
padding: 20upx 0 0;
|
padding: 20upx 0 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -924,6 +1020,7 @@ page {
|
|||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected {
|
.selected {
|
||||||
background: #fbebee;
|
background: #fbebee;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
@@ -942,24 +1039,30 @@ page {
|
|||||||
|
|
||||||
&.show {
|
&.show {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
.mask {
|
.mask {
|
||||||
animation: showPopup 0.2s linear both;
|
animation: showPopup 0.2s linear both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer {
|
.layer {
|
||||||
animation: showLayer 0.2s linear both;
|
animation: showLayer 0.2s linear both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.hide {
|
&.hide {
|
||||||
.mask {
|
.mask {
|
||||||
animation: hidePopup 0.2s linear both;
|
animation: hidePopup 0.2s linear both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer {
|
.layer {
|
||||||
animation: hideLayer 0.2s linear both;
|
animation: hideLayer 0.2s linear both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.none {
|
&.none {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mask {
|
.mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -968,6 +1071,7 @@ page {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer {
|
.layer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
@@ -976,6 +1080,7 @@ page {
|
|||||||
min-height: 40vh;
|
min-height: 40vh;
|
||||||
border-radius: 10upx 10upx 0 0;
|
border-radius: 10upx 10upx 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
height: 66upx;
|
height: 66upx;
|
||||||
line-height: 66upx;
|
line-height: 66upx;
|
||||||
@@ -986,34 +1091,42 @@ page {
|
|||||||
margin: 30upx auto 20upx;
|
margin: 30upx auto 20upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes showPopup {
|
@keyframes showPopup {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes hidePopup {
|
@keyframes hidePopup {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes showLayer {
|
@keyframes showLayer {
|
||||||
0% {
|
0% {
|
||||||
transform: translateY(120%);
|
transform: translateY(120%);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
transform: translateY(0%);
|
transform: translateY(0%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes hideLayer {
|
@keyframes hideLayer {
|
||||||
0% {
|
0% {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
transform: translateY(120%);
|
transform: translateY(120%);
|
||||||
}
|
}
|
||||||
@@ -1044,23 +1157,28 @@ page {
|
|||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
width: 96upx;
|
width: 96upx;
|
||||||
height: 80upx;
|
height: 80upx;
|
||||||
|
|
||||||
.yticon {
|
.yticon {
|
||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
line-height: 48upx;
|
line-height: 48upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active,
|
&.active,
|
||||||
&.active .yticon {
|
&.active .yticon {
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-fenxiang2 {
|
.icon-fenxiang2 {
|
||||||
font-size: 42upx;
|
font-size: 42upx;
|
||||||
transform: translateY(-2upx);
|
transform: translateY(-2upx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-shoucang {
|
.icon-shoucang {
|
||||||
font-size: 46upx;
|
font-size: 46upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn-group {
|
.action-btn-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 76upx;
|
height: 76upx;
|
||||||
@@ -1071,6 +1189,7 @@ page {
|
|||||||
background: linear-gradient(to right, #ffac30, #fa436a, #f56c6c);
|
background: linear-gradient(to right, #ffac30, #fa436a, #f56c6c);
|
||||||
margin-left: 20upx;
|
margin-left: 20upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -1081,6 +1200,7 @@ page {
|
|||||||
width: 0;
|
width: 0;
|
||||||
border-right: 1px solid rgba(255, 255, 255, 0.5);
|
border-right: 1px solid rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1117,9 +1237,11 @@ page {
|
|||||||
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);
|
||||||
|
|
||||||
@@ -1135,12 +1257,14 @@ page {
|
|||||||
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;
|
||||||
@@ -1152,6 +1276,7 @@ page {
|
|||||||
transform: scaleY(50%);
|
transform: scaleY(50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -1160,15 +1285,18 @@ page {
|
|||||||
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;
|
||||||
@@ -1178,20 +1306,24 @@ page {
|
|||||||
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;
|
||||||
@@ -1201,22 +1333,26 @@ page {
|
|||||||
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: '';
|
||||||
@@ -1226,15 +1362,18 @@ page {
|
|||||||
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;
|
||||||
@@ -1247,25 +1386,30 @@ page {
|
|||||||
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: 100upx;
|
width: 100upx;
|
||||||
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;
|
||||||
@@ -1278,6 +1422,7 @@ page {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import Json from '@/Json';
|
import Json from '@/Json';
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ import { formatDate } from '@/common/date';
|
|||||||
import uniIcon from "@/components/uni-icon/uni-icon.vue";
|
import uniIcon from "@/components/uni-icon/uni-icon.vue";
|
||||||
import eonfox from "@/components/eonfox/eonfox.js"
|
import eonfox from "@/components/eonfox/eonfox.js"
|
||||||
import fns from '@/components/eonfox/fns.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
|
// #ifdef H5
|
||||||
let jweixin = require('jweixin-module');
|
let jweixin = require('jweixin-module');
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ import coupon from '@/components/coolc-coupon/coolc-coupon';
|
|||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import navBar from '@/components/zhouWei-navBar';
|
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';
|
import share from '@/components/share';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
<view class="introduce-section">
|
<view class="introduce-section">
|
||||||
<text class="title">{{ detailData.title }}</text>
|
<text class="title">{{ detailData.title }}</text>
|
||||||
|
|
||||||
<view class="bot-row">
|
<!-- <view class="bot-row">
|
||||||
<text>收藏量: {{ detailData.collectCount }}</text>
|
<text>收藏量: {{ detailData.collectCount }}</text>
|
||||||
<text>评论量: {{ detailData.commentCount }}</text>
|
<text>评论量: {{ detailData.commentCount }}</text>
|
||||||
<text>浏览量: {{ detailData.readCount }}</text>
|
<text>浏览量: {{ detailData.readCount }}</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="c-list">
|
<view class="c-list">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部操作菜单 -->
|
<!-- 底部操作菜单 -->
|
||||||
<view class="page-bottom">
|
<!-- <view class="page-bottom">
|
||||||
<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
|
<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
|
||||||
<text class="yticon icon-xiatubiao--copy"></text>
|
<text class="yticon icon-xiatubiao--copy"></text>
|
||||||
<text>首页</text>
|
<text>首页</text>
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
<text class="yticon icon-shoucang"></text>
|
<text class="yticon icon-shoucang"></text>
|
||||||
<text>收藏</text>
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 分享 -->
|
<!-- 分享 -->
|
||||||
<share ref="share" :contentHeight="580" :shareList="shareList"></share>
|
<!-- <share ref="share" :contentHeight="580" :shareList="shareList"></share> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
<text class="listcard-content_title_text">发布时间:{{item.createTime | formatCreateTime}}</text>
|
<text class="listcard-content_title_text">发布时间:{{item.createTime | formatCreateTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="listcard-content_des">
|
<!-- <view class="listcard-content_des">
|
||||||
|
|
||||||
<view class="listcard-content_des-label">
|
<view class="listcard-content_des-label">
|
||||||
<view class="listcard-content_des-label-item">收藏{{item.collectCount}}</view>
|
<view class="listcard-content_des-label-item">收藏{{item.collectCount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="listcard-content_des-browe">浏览{{item.readCount}}</view>
|
<view class="listcard-content_des-browe">浏览{{item.readCount}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -167,6 +167,7 @@
|
|||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
margin-top: 5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@@ -175,7 +176,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.listcard-content_title_text {
|
.listcard-content_title_text {
|
||||||
margin-top: 5px;
|
margin-top: 28px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="navbar">
|
<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>
|
</view>
|
||||||
|
|
||||||
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
||||||
@@ -19,7 +20,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="goods-box-single">
|
<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">
|
<view class="right">
|
||||||
<text class="title clamp">{{ item.name }}</text>
|
<text class="title clamp">{{ item.name }}</text>
|
||||||
<text class="attr-box">{{ item.meno3 }}</text>
|
<text class="attr-box">{{ item.meno3 }}</text>
|
||||||
@@ -37,12 +39,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import { formatDate } from '@/common/date';
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
@@ -52,25 +58,26 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabCurrentIndex: 0,
|
tabCurrentIndex: 0,
|
||||||
navList: [
|
pageNum:1,
|
||||||
{
|
navList: [{
|
||||||
type: 1,
|
type: 1,
|
||||||
text: '收藏商品',
|
text: '收藏商品',
|
||||||
loadingType: 'more',
|
loadingType: 'more',
|
||||||
orderList: []
|
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: {
|
computed: {
|
||||||
...mapState(['hasLogin', 'userInfo'])
|
...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: {
|
methods: {
|
||||||
//详情页
|
//详情页
|
||||||
navToDetailPage(item) {
|
navToDetailPage(item) {
|
||||||
@@ -100,7 +124,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
async loadData(source) {
|
async loadData(source) {
|
||||||
console.log('=======================')
|
// console.log('=======================')
|
||||||
|
|
||||||
//这里是将订单挂载到tab列表下
|
//这里是将订单挂载到tab列表下
|
||||||
let index = this.tabCurrentIndex;
|
let index = this.tabCurrentIndex;
|
||||||
@@ -118,13 +142,24 @@ export default {
|
|||||||
|
|
||||||
navItem.loadingType = 'loading';
|
navItem.loadingType = 'loading';
|
||||||
|
|
||||||
if (!this.hasLogin) {
|
// if (!this.hasLogin) {
|
||||||
url = '/pages/public/login';
|
// url = '/pages/public/login';
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url
|
// url
|
||||||
});
|
// });
|
||||||
|
// } else {
|
||||||
|
//没有更多直接返回
|
||||||
|
if (type === 'add') {
|
||||||
|
if (this.loadingType === 'nomore') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadingType = 'loading';
|
||||||
} else {
|
} else {
|
||||||
let params = { };
|
this.loadingType = 'more';
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
};
|
||||||
let data = await Api.apiCall('get', Api.goods.listCollect, params);
|
let data = await Api.apiCall('get', Api.goods.listCollect, params);
|
||||||
|
|
||||||
let orderList = data.records.filter(item => {
|
let orderList = data.records.filter(item => {
|
||||||
@@ -148,7 +183,7 @@ export default {
|
|||||||
|
|
||||||
//判断是否还有数据, 有改为 more, 没有改为noMore
|
//判断是否还有数据, 有改为 more, 没有改为noMore
|
||||||
navItem.loadingType = 'more';
|
navItem.loadingType = 'more';
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
//swiper 切换
|
//swiper 切换
|
||||||
@@ -172,7 +207,9 @@ export default {
|
|||||||
let list = this.navList[this.tabCurrentIndex].orderList;
|
let list = this.navList[this.tabCurrentIndex].orderList;
|
||||||
let row = list[index];
|
let row = list[index];
|
||||||
let id = row.id;
|
let id = row.id;
|
||||||
let params = { ids: id };
|
let params = {
|
||||||
|
ids: id
|
||||||
|
};
|
||||||
let data = Api.apiCall('post', Api.goods.deleteCollect, params);
|
let data = Api.apiCall('post', Api.goods.deleteCollect, params);
|
||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
@@ -181,7 +218,10 @@ export default {
|
|||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let { stateTip, stateTipColor } = this.orderStateExp(9);
|
let {
|
||||||
|
stateTip,
|
||||||
|
stateTipColor
|
||||||
|
} = this.orderStateExp(9);
|
||||||
item = Object.assign(item, {
|
item = Object.assign(item, {
|
||||||
type: 9,
|
type: 9,
|
||||||
stateTip,
|
stateTip,
|
||||||
@@ -215,7 +255,10 @@ export default {
|
|||||||
|
|
||||||
//更多自定义
|
//更多自定义
|
||||||
}
|
}
|
||||||
return { stateTip, stateTipColor };
|
return {
|
||||||
|
stateTip,
|
||||||
|
stateTipColor
|
||||||
|
};
|
||||||
},
|
},
|
||||||
dateFormat(time) {
|
dateFormat(time) {
|
||||||
if (time == null || time === '') {
|
if (time == null || time === '') {
|
||||||
@@ -238,6 +281,7 @@ page,
|
|||||||
.swiper-box {
|
.swiper-box {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-scroll-content {
|
.list-scroll-content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
@@ -250,6 +294,7 @@ page,
|
|||||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -259,8 +304,10 @@ page,
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -278,12 +325,14 @@ page,
|
|||||||
.uni-swiper-item {
|
.uni-swiper-item {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-item {
|
.order-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 30upx;
|
padding-left: 30upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
|
|
||||||
.i-top {
|
.i-top {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -292,17 +341,21 @@ page,
|
|||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.state {
|
.state {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.del-btn {
|
.del-btn {
|
||||||
padding: 10upx 0 10upx 36upx;
|
padding: 10upx 0 10upx 36upx;
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 0;
|
width: 0;
|
||||||
@@ -315,51 +368,61 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 多条商品 */
|
/* 多条商品 */
|
||||||
.goods-box {
|
.goods-box {
|
||||||
height: 160upx;
|
height: 160upx;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
width: 120upx;
|
width: 120upx;
|
||||||
height: 120upx;
|
height: 120upx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 24upx;
|
margin-right: 24upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-img {
|
.goods-img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单条商品 */
|
/* 单条商品 */
|
||||||
.goods-box-single {
|
.goods-box-single {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
|
|
||||||
.goods-img {
|
.goods-img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 120upx;
|
width: 120upx;
|
||||||
height: 120upx;
|
height: 120upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 30upx 0 24upx;
|
padding: 0 30upx 0 24upx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attr-box {
|
.attr-box {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
padding: 10upx 12upx;
|
padding: 10upx 12upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
@@ -376,13 +439,16 @@ page,
|
|||||||
padding: 20upx 30upx;
|
padding: 20upx 30upx;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
margin: 0 8upx;
|
margin: 0 8upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
@@ -390,6 +456,7 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-box {
|
.action-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@@ -398,6 +465,7 @@ page,
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 30upx;
|
padding-right: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
width: 160upx;
|
width: 160upx;
|
||||||
height: 60upx;
|
height: 60upx;
|
||||||
@@ -410,12 +478,15 @@ page,
|
|||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.recom {
|
&.recom {
|
||||||
background: #fff9f9;
|
background: #fff9f9;
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-color: #f7bcc8;
|
border-color: #f7bcc8;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue'
|
||||||
import { formatDate } from '@/common/date';
|
import { formatDate } from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -9,10 +9,11 @@ const $iconUrl = "/static/icon/ic_ar.png";
|
|||||||
// 获取当前应用的版本号
|
// 获取当前应用的版本号
|
||||||
export const getCurrentNo = function(callback) {
|
export const getCurrentNo = function(callback) {
|
||||||
// 获取本地应用资源版本号
|
// 获取本地应用资源版本号
|
||||||
|
console.log("》》》》", 11111111111111111);
|
||||||
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
||||||
callback && callback({
|
callback && callback({
|
||||||
versionCode: inf.version.replace(/\./g, ""),
|
versionCode: inf.version.replace(/\./g, ""),
|
||||||
version: inf.version
|
version: inf.version,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -32,11 +33,12 @@ export const getServerNo = function(version, isPrompt = false, callback) {
|
|||||||
} else {
|
} else {
|
||||||
httpData.type = 1102;
|
httpData.type = 1102;
|
||||||
}
|
}
|
||||||
|
console.log("》》》》", 222222);
|
||||||
/* 接口入参说明
|
/* 接口入参说明
|
||||||
* version: 应用当前版本号(已自动获取)
|
* version: 应用当前版本号(已自动获取)
|
||||||
* type:平台(1101是安卓,1102是IOS)
|
* type:平台(1101是安卓,1102是IOS)
|
||||||
*/
|
*/
|
||||||
$http.get("api/appVersion/versioninfo", httpData, {
|
$http.get("appVersion/versioninfo", httpData, {
|
||||||
isPrompt: isPrompt
|
isPrompt: isPrompt
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
/* res的数据说明
|
/* res的数据说明
|
||||||
@@ -48,6 +50,7 @@ export const getServerNo = function(version, isPrompt = false, callback) {
|
|||||||
* | forceUpdate | y | boolean | 是否强制更新 |
|
* | forceUpdate | y | boolean | 是否强制更新 |
|
||||||
* | downloadUrl | y | String | 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接) |
|
* | downloadUrl | y | String | 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接) |
|
||||||
*/
|
*/
|
||||||
|
console.log("》》》》", 333333333);
|
||||||
console.log(res)
|
console.log(res)
|
||||||
console.log(JSON.parse(res));
|
console.log(JSON.parse(res));
|
||||||
console.log(JSON.stringify(JSON.parse(res)))
|
console.log(JSON.stringify(JSON.parse(res)))
|
||||||
@@ -76,6 +79,7 @@ export const getDownload = function(res) {
|
|||||||
let file = data.fileName
|
let file = data.fileName
|
||||||
let dtask;
|
let dtask;
|
||||||
let lastProgressValue = 0;
|
let lastProgressValue = 0;
|
||||||
|
console.log("》》》》", 44444444);
|
||||||
downloadPopup(popupData, function(res) {
|
downloadPopup(popupData, function(res) {
|
||||||
dtask = plus.downloader.createDownload(data.downloadUrl, {
|
dtask = plus.downloader.createDownload(data.downloadUrl, {
|
||||||
// filename: '_doc/update/' + file + '/' + new Date().getTime() + '/'
|
// filename: '_doc/update/' + file + '/' + new Date().getTime() + '/'
|
||||||
@@ -670,7 +674,8 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
|
|||||||
} else if (buttonNum == 2) {
|
} else if (buttonNum == 2) {
|
||||||
// 双按钮
|
// 双按钮
|
||||||
let buttonWidth = (popupViewData.viewContentWidth - popupViewData.viewContentPadding) / 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();
|
maskLayer.hide();
|
||||||
popupView.hide();
|
popupView.hide();
|
||||||
cancelCallback && cancelCallback();
|
cancelCallback && cancelCallback();
|
||||||
@@ -781,8 +786,10 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
|
|||||||
}
|
}
|
||||||
export default function(isPrompt = false) {
|
export default function(isPrompt = false) {
|
||||||
getCurrentNo(version => {
|
getCurrentNo(version => {
|
||||||
|
console.log("》》》》", version);
|
||||||
getServerNo(version.versionCode, isPrompt, data => {
|
getServerNo(version.versionCode, isPrompt, data => {
|
||||||
let res = JSON.parse(data);
|
let res = JSON.parse(data);
|
||||||
|
console.log("》》》》", 6666666);
|
||||||
if (res.forceUpdate) {
|
if (res.forceUpdate) {
|
||||||
if (/\.wgt$/i.test(res.downloadUrl)) {
|
if (/\.wgt$/i.test(res.downloadUrl)) {
|
||||||
getDownload(res);
|
getDownload(res);
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ export default class request {
|
|||||||
// 获取默认信息
|
// 获取默认信息
|
||||||
getDefault(data, options = {}) {
|
getDefault(data, options = {}) {
|
||||||
//判断url是不是链接
|
//判断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);
|
let config = Object.assign({}, this.config, options, data);
|
||||||
if (data.method == "FILE") {
|
if (data.method == "FILE") {
|
||||||
config.url = urlType ? data.url : this.fileUrl + data.url;
|
config.url = urlType ? data.url : this.fileUrl + data.url;
|
||||||
@@ -88,6 +89,7 @@ export default class request {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let requestInfo = this.getDefault(data);
|
let requestInfo = this.getDefault(data);
|
||||||
|
|
||||||
//请求前回调
|
//请求前回调
|
||||||
if (this.requestStart) {
|
if (this.requestStart) {
|
||||||
let requestStart = this.requestStart(requestInfo);
|
let requestStart = this.requestStart(requestInfo);
|
||||||
@@ -110,9 +112,12 @@ export default class request {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log("url: requestInfo.url》》》》", requestInfo.url)
|
||||||
|
console.log("url: requestInfo.header》》》》", requestInfo.header)
|
||||||
let requestData = {
|
let requestData = {
|
||||||
url: requestInfo.url,
|
url: requestInfo.url,
|
||||||
header: requestInfo.header, //加入请求头
|
header: requestInfo.header, //加入请求头
|
||||||
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
//请求完成回调
|
//请求完成回调
|
||||||
this.requestEnd && this.requestEnd(requestInfo, res);
|
this.requestEnd && this.requestEnd(requestInfo, res);
|
||||||
|
|||||||
Reference in New Issue
Block a user