mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-20 01:15:53 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4400e406f6 | ||
|
|
78f81a8407 | ||
|
|
d166d5943c | ||
|
|
c0e5d75cc6 |
11
api/im.js
11
api/im.js
@@ -2,6 +2,17 @@ import { http,Method } from "@/utils/request.js";
|
|||||||
|
|
||||||
import api from "@/config/api.js";
|
import api from "@/config/api.js";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function getImSetting() {
|
||||||
|
return http.request({
|
||||||
|
url: `/other/setting/get/IM_SETTING`,
|
||||||
|
method: Method.GET,
|
||||||
|
needToken: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取聊天详情接口
|
* 获取聊天详情接口
|
||||||
* @param {*} talkId
|
* @param {*} talkId
|
||||||
|
|||||||
@@ -32,26 +32,7 @@
|
|||||||
<span>已售 {{ item.buyCount || "0" }}</span>
|
<span>已售 {{ item.buyCount || "0" }}</span>
|
||||||
<span>{{ item.commentNum || "0" }}条评论</span>
|
<span>{{ item.commentNum || "0" }}条评论</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="store-seller-name"
|
|
||||||
v-if="storeName"
|
|
||||||
@click="navigateToStoreDetailPage(item)"
|
|
||||||
>
|
|
||||||
<div class="text-hidden">
|
|
||||||
<u-tag
|
|
||||||
style="margin-right: 10rpx"
|
|
||||||
size="mini"
|
|
||||||
mode="dark"
|
|
||||||
v-if="item.selfOperated"
|
|
||||||
text="自营"
|
|
||||||
type="error"
|
|
||||||
/>
|
|
||||||
<span>{{ item.storeName || "暂无" }}</span>
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
<u-icon name="arrow-right"></u-icon>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -34,16 +34,7 @@
|
|||||||
<span>已售 {{ item.buyCount || "0" }}</span>
|
<span>已售 {{ item.buyCount || "0" }}</span>
|
||||||
<span>{{ item.commentNum || "0" }}条评论</span>
|
<span>{{ item.commentNum || "0" }}条评论</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="store-seller-name" v-if="storeName" @click="navigateToStoreDetailPage(item)">
|
|
||||||
<div class="text-hidden">
|
|
||||||
<u-tag style="margin-right: 10rpx" size="mini" mode="dark" v-if="item.selfOperated"
|
|
||||||
text="自营" type="error" />
|
|
||||||
<span>{{ item.storeName || "暂无" }}</span>
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
<u-icon name="arrow-right"></u-icon>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -79,18 +70,7 @@
|
|||||||
<span style="float: left; font-size: 22rpx">已售 {{ item.buyCount || '0' }}</span>
|
<span style="float: left; font-size: 22rpx">已售 {{ item.buyCount || '0' }}</span>
|
||||||
<span style="float: right; font-size: 22rpx">{{ item.commentNum || '0' }}条评论</span>
|
<span style="float: right; font-size: 22rpx">{{ item.commentNum || '0' }}条评论</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="overflow: hidden" @click="navigateToStoreDetailPage(item)" class="count-config">
|
|
||||||
<div class="text-hidden" v-if="storeName">
|
|
||||||
<u-tag style="margin-right: 10rpx" size="mini" mode="dark" v-if="item.selfOperated"
|
|
||||||
text="自营" type="error" />
|
|
||||||
<span class="line1-store-name">{{ item.storeName }}</span>
|
|
||||||
<span class="to-store">进店<u-icon size="24" name="arrow-right" color="#666"></u-icon>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
<u-icon name="arrow-right" color="#c5c5c5"></u-icon>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
"pages": [{
|
"pages": [{
|
||||||
"path": "shopPage",
|
"path": "shopPage",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "店铺详情",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="log-item-view">
|
<view class="log-item-view">
|
||||||
<view>创建时间:{{ item.createTime }}</view>
|
<view>创建时间:{{ item.createTime }}</view>
|
||||||
<view>店铺:{{ item.storeName }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="log-item-footer">
|
<view class="log-item-footer">
|
||||||
<view>会员名称:{{ item.memberName }}</view>
|
<view>会员名称:{{ item.memberName }}</view>
|
||||||
|
|||||||
@@ -66,42 +66,45 @@
|
|||||||
<!-- 商品列表 -->
|
<!-- 商品列表 -->
|
||||||
|
|
||||||
<view class="goods-list">
|
<view class="goods-list">
|
||||||
<u-swipe-action v-for="(item, index) in goodsList" :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :index="index" :options="options" bg-color="#fff"
|
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate">
|
||||||
ref="swiperAction" :key="item.id" @click="changeActionTab(item)">
|
<u-swipe-action v-for="(item, index) in goodsList" :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :index="index" :options="options" bg-color="#fff"
|
||||||
|
ref="swiperAction" :key="item.id" @click="changeActionTab(item)">
|
||||||
|
|
||||||
<div class="goods-item">
|
<div class="goods-item">
|
||||||
<view class="goods-item-img" @click="handleNavgationGoods(item)">
|
<view class="goods-item-img" @click="handleNavgationGoods(item)">
|
||||||
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
|
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
|
||||||
</view>
|
|
||||||
<view class="goods-item-desc">
|
|
||||||
<!-- 商品描述 -->
|
|
||||||
<view class="-item-title" @click="handleNavgationGoods(item)">
|
|
||||||
{{ item.goodsName }}
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 商品金额 -->
|
<view class="goods-item-desc">
|
||||||
<view class="-item-price" @click="handleNavgationGoods(item)">
|
<!-- 商品描述 -->
|
||||||
佣金:
|
<view class="-item-title" @click="handleNavgationGoods(item)">
|
||||||
<span> ¥{{ item.commission | unitPrice }}</span>
|
{{ item.goodsName }}
|
||||||
</view>
|
</view>
|
||||||
<!-- 比率佣金 -->
|
<!-- 商品金额 -->
|
||||||
<view class="-item-bottom">
|
<view class="-item-price" @click="handleNavgationGoods(item)">
|
||||||
<view class="-item-bootom-money" @click="handleNavgationGoods(item)">
|
佣金:
|
||||||
<!-- <view class="-item-bl">
|
<span> ¥{{ item.commission | unitPrice }}</span>
|
||||||
比率:
|
</view>
|
||||||
<span>{{ "5.00%" }}</span>
|
<!-- 比率佣金 -->
|
||||||
</view> -->
|
<view class="-item-bottom">
|
||||||
<view class="-item-yj">
|
<view class="-item-bootom-money" @click="handleNavgationGoods(item)">
|
||||||
<span>¥{{ item.price | unitPrice }}</span>
|
<!-- <view class="-item-bl">
|
||||||
|
比率:
|
||||||
|
<span>{{ "5.00%" }}</span>
|
||||||
|
</view> -->
|
||||||
|
<view class="-item-yj">
|
||||||
|
<span>¥{{ item.price | unitPrice }}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="click" v-if="!params.checked" @click="handleClickGoods(item)">立即选取</view>
|
||||||
|
<view class="click" v-if="params.checked" @click="handleLink(item)">分销商品</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
|
||||||
<view class="click" v-if="!params.checked" @click="handleClickGoods(item)">立即选取</view>
|
|
||||||
<view class="click" v-if="params.checked" @click="handleLink(item)">分销商品</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</div>
|
||||||
</div>
|
</u-swipe-action>
|
||||||
</u-swipe-action>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
<view class="empty">
|
<view class="empty">
|
||||||
<!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> -->
|
<!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> -->
|
||||||
@@ -295,15 +298,30 @@ export default {
|
|||||||
});
|
});
|
||||||
this.goodsList.push(...res.data.result.records);
|
this.goodsList.push(...res.data.result.records);
|
||||||
}
|
}
|
||||||
if (this.goodsList.length == 0) {
|
if (this.goodsList.length === 0) {
|
||||||
this.empty = true;
|
this.empty = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 底部加载数据
|
||||||
|
*/
|
||||||
|
renderDate() {
|
||||||
|
|
||||||
|
this.params.pageNumber += 1;
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.body-view {
|
||||||
|
overflow-y: auto;
|
||||||
|
height: calc(100vh - 44px - 80rpx - 104rpx);
|
||||||
|
}
|
||||||
.canvas-hide {
|
.canvas-hide {
|
||||||
/* 1 */
|
/* 1 */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -27,36 +27,7 @@
|
|||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 显示收藏的店铺栏 -->
|
|
||||||
<view v-else class="tab-content">
|
|
||||||
<scroll-view class="list-scroll-content" scroll-y>
|
|
||||||
<!-- 空白页 -->
|
|
||||||
<u-empty style="margin-top: 40rpx" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
|
|
||||||
<!-- 店铺展示数据 -->
|
|
||||||
<u-swipe-action @open="openLeftChange(item, 'store')" :show="item.selected" btn-width="180"
|
|
||||||
:options="LeftOptions" v-else v-for="(item, index) in storeList" :key="index"
|
|
||||||
@click="clickStoreSwiperAction(item)">
|
|
||||||
<view class="store" @click="goStoreMainPage(item.id)">
|
|
||||||
<view class="intro">
|
|
||||||
<view class="store-logo">
|
|
||||||
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
|
|
||||||
mode="aspectFit">
|
|
||||||
<u-loading slot="loading"></u-loading>
|
|
||||||
</u-image>
|
|
||||||
</view>
|
|
||||||
<view class="store-name">
|
|
||||||
<view>{{ item.storeName }}</view>
|
|
||||||
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
|
|
||||||
text="自营" mode="plain" shape="circle" />
|
|
||||||
</view>
|
|
||||||
<view class="store-collect">
|
|
||||||
<view>进店逛逛</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-swipe-action>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -90,14 +61,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "店铺(0)",
|
|
||||||
|
|
||||||
params: {
|
|
||||||
pageNumber: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
goodsEmpty: false, //商品数据是否为空
|
goodsEmpty: false, //商品数据是否为空
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<view v-for="(item, index) in trackList" :key="index">
|
<view v-for="(item, index) in trackList" :key="index">
|
||||||
<view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
|
|
||||||
<view class="myTracks-items">
|
<view class="myTracks-items">
|
||||||
|
|
||||||
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
||||||
|
|||||||
@@ -28,9 +28,6 @@
|
|||||||
>
|
>
|
||||||
<!-- 店铺名称 -->
|
<!-- 店铺名称 -->
|
||||||
<view class="seller-info u-flex u-row-between" v-if="current == 0">
|
<view class="seller-info u-flex u-row-between" v-if="current == 0">
|
||||||
<view class="seller-name">
|
|
||||||
<view class="name">{{ order.storeName }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-sn">订单编号:{{ order.sn }}</view>
|
<view class="order-sn">订单编号:{{ order.sn }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 申请记录 选项卡 -->
|
<!-- 申请记录 选项卡 -->
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<u-form :model="form" ref="uForm">
|
<u-form :model="form" ref="uForm">
|
||||||
<view class="after-sales-goods-detail-view">
|
<view class="after-sales-goods-detail-view">
|
||||||
<view class="header">
|
|
||||||
<view>
|
|
||||||
本次售后服务将由
|
|
||||||
<text class="seller-name">{{ sku.storeName }}</text>
|
|
||||||
为您提供
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<view class="goods-item-view" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn"
|
<view class="goods-item-view" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn"
|
||||||
@click="gotoGoodsDetail(sku.goods_id)">
|
@click="gotoGoodsDetail(sku.goods_id)">
|
||||||
|
|||||||
@@ -2,13 +2,7 @@
|
|||||||
<view class="mp-iphonex-bottom content">
|
<view class="mp-iphonex-bottom content">
|
||||||
<u-form :model="form" ref="uForm">
|
<u-form :model="form" ref="uForm">
|
||||||
<view class="after-sales-goods-detail-view">
|
<view class="after-sales-goods-detail-view">
|
||||||
<view class="header">
|
|
||||||
<view>
|
|
||||||
本次售后服务将由
|
|
||||||
<text class="seller-name">{{ sku.storeName }}</text>
|
|
||||||
为您提供
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<view class="goods-item-view" @click="gotoGoodsDetail(sku.skuId)">
|
<view class="goods-item-view" @click="gotoGoodsDetail(sku.skuId)">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="after-sales-goods-detail-view">
|
<view class="after-sales-goods-detail-view">
|
||||||
<view class="header">
|
|
||||||
<view>
|
|
||||||
本次售后服务将由
|
|
||||||
<text class="seller-name">{{ sku.storeName }}</text>
|
|
||||||
为您提供
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<view class="goods-item-view" :key="index" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
|
<view class="goods-item-view" :key="index" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="serviceDetail">
|
<view v-if="serviceDetail">
|
||||||
<view class="after-sales-goods-detail-view">
|
<view class="after-sales-goods-detail-view">
|
||||||
<view class="header">
|
|
||||||
<view>
|
|
||||||
本次售后服务将由
|
|
||||||
<text class="seller-name">{{ serviceDetail.storeName }}</text>
|
|
||||||
为您提供
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="apply-info-view">
|
<view class="apply-info-view">
|
||||||
<view class="status-info">
|
<view class="status-info">
|
||||||
<view class="status-info-box">
|
<view class="status-info-box">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<view class="seller-view">
|
<view class="seller-view">
|
||||||
<view class="seller-info u-flex u-row-between">
|
<view class="seller-info u-flex u-row-between">
|
||||||
<view class="seller-name">
|
<view class="seller-name">
|
||||||
<view class="name">{{ order.storeName || "" }}</view>
|
|
||||||
<view class="status">{{ orderStatusList[order.orderStatus] }}</view>
|
<view class="status">{{ orderStatusList[order.orderStatus] }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-sn"></view>
|
<view class="order-sn"></view>
|
||||||
@@ -68,6 +67,7 @@ export default {
|
|||||||
orderStatusList: {
|
orderStatusList: {
|
||||||
//订单状态列表
|
//订单状态列表
|
||||||
UNDELIVERED: "待发货",
|
UNDELIVERED: "待发货",
|
||||||
|
PARTS_DELIVERED: "部分发货",
|
||||||
UNPAID: "未付款",
|
UNPAID: "未付款",
|
||||||
PAID: "已付款",
|
PAID: "已付款",
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="seller-view" v-for="(item, index) in complaionData" :key="index">
|
<view class="seller-view" v-for="(item, index) in complaionData" :key="index">
|
||||||
<view class="seller-info u-flex u-row-between">
|
<view class="seller-info u-flex u-row-between">
|
||||||
<view class="seller-name">
|
|
||||||
<view class="name">{{ item.storeName }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-sn">{{ statusData[item.complainStatus] }}</view>
|
<view class="order-sn">{{ statusData[item.complainStatus] }}</view>
|
||||||
</view>
|
</view>
|
||||||
<u-line color="#DCDFE6"></u-line>
|
<u-line color="#DCDFE6"></u-line>
|
||||||
|
|||||||
@@ -11,11 +11,6 @@
|
|||||||
<u-empty text="尚无需要评价的商品" mode="list" v-if="orderList.length == 0"></u-empty>
|
<u-empty text="尚无需要评价的商品" mode="list" v-if="orderList.length == 0"></u-empty>
|
||||||
<view class="seller-view" v-for="(order, index) in orderList" :key="index">
|
<view class="seller-view" v-for="(order, index) in orderList" :key="index">
|
||||||
<!-- 店铺名称 -->
|
<!-- 店铺名称 -->
|
||||||
<view class="box-title">
|
|
||||||
<view class="title_seller_name">
|
|
||||||
{{ order.storeName }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-for="(sku, _index) in order.orderItems" :key="_index">
|
<view v-for="(sku, _index) in order.orderItems" :key="_index">
|
||||||
<view class="goods-item-view">
|
<view class="goods-item-view">
|
||||||
<view>
|
<view>
|
||||||
|
|||||||
@@ -125,11 +125,6 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div v-if="item.checked">
|
<div v-if="item.checked">
|
||||||
<div @click="navigateToStore(item)">
|
|
||||||
<div class="store-name">
|
|
||||||
<span>{{ item.storeName }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
|
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
|
||||||
<div
|
<div
|
||||||
class="flex goods-item"
|
class="flex goods-item"
|
||||||
|
|||||||
@@ -39,10 +39,7 @@
|
|||||||
v-for="(order, oderIndex) in tabItem.orderList"
|
v-for="(order, oderIndex) in tabItem.orderList"
|
||||||
>
|
>
|
||||||
<!-- 店铺名称 -->
|
<!-- 店铺名称 -->
|
||||||
<view class="seller-info u-flex u-row-between">
|
<view class="seller-info u-flex u-row-left ">
|
||||||
<view class="seller-name wes" @click="navigateToStore(order)">
|
|
||||||
<view class="name wes">{{ order.storeName }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-sn">{{
|
<view class="order-sn">{{
|
||||||
order.orderStatus | orderStatusList
|
order.orderStatus | orderStatusList
|
||||||
}}</view>
|
}}</view>
|
||||||
@@ -701,7 +698,7 @@ page,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.order-sn {
|
.order-sn {
|
||||||
flex:2;
|
|
||||||
width:120rpx;
|
width:120rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $aider-light-color;
|
color: $aider-light-color;
|
||||||
|
|||||||
@@ -72,14 +72,6 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="seller-view">
|
<view class="seller-view">
|
||||||
<!-- 店铺名称 -->
|
<!-- 店铺名称 -->
|
||||||
<view class="seller-info u-flex u-row-between">
|
|
||||||
<view class="seller-name" @click="goToShopPage(order)">
|
|
||||||
<view class="name">{{ order.storeName }}</view>
|
|
||||||
<view class="status" v-if="orderStatusList[order.orderStatus]"> {{ orderStatusList[order.orderStatus].title
|
|
||||||
}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-sn"></view>
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<view v-for="(sku, skuIndex) in orderGoodsList" :key="skuIndex">
|
<view v-for="(sku, skuIndex) in orderGoodsList" :key="skuIndex">
|
||||||
<view class="goods-item-view">
|
<view class="goods-item-view">
|
||||||
@@ -289,6 +281,10 @@ export default {
|
|||||||
title: "待发货",
|
title: "待发货",
|
||||||
value: "商品等待发货中",
|
value: "商品等待发货中",
|
||||||
},
|
},
|
||||||
|
PARTS_DELIVERED: {
|
||||||
|
title: "部分发货",
|
||||||
|
value: "商品已部分发货。",
|
||||||
|
},
|
||||||
DELIVERED: {
|
DELIVERED: {
|
||||||
title: "已发货",
|
title: "已发货",
|
||||||
value: "商品已发货,请您耐心等待",
|
value: "商品已发货,请您耐心等待",
|
||||||
|
|||||||
@@ -183,8 +183,6 @@
|
|||||||
<!-- 评价 -->
|
<!-- 评价 -->
|
||||||
<Evaluation id="main5" :goodsDetail="goodsDetail" />
|
<Evaluation id="main5" :goodsDetail="goodsDetail" />
|
||||||
|
|
||||||
<!-- 店铺推荐 -->
|
|
||||||
<storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
|
|
||||||
|
|
||||||
<!-- 宝贝详情 -->
|
<!-- 宝贝详情 -->
|
||||||
<GoodsIntro id="main9" :res="goodsDetail" :goodsParams="goodsParams" :goodsId="goodsDetail.goodsId"
|
<GoodsIntro id="main9" :res="goodsDetail" :goodsParams="goodsParams" :goodsId="goodsDetail.goodsId"
|
||||||
@@ -198,10 +196,6 @@
|
|||||||
|
|
||||||
<view class="page-bottom mp-iphonex-bottom" id="pageBottom">
|
<view class="page-bottom mp-iphonex-bottom" id="pageBottom">
|
||||||
<view class="icon-btn">
|
<view class="icon-btn">
|
||||||
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
|
|
||||||
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
|
||||||
<view class="red icon-btn-name">店铺</view>
|
|
||||||
</view>
|
|
||||||
<view class="icon-btn-item" @click="linkMsgDetail()">
|
<view class="icon-btn-item" @click="linkMsgDetail()">
|
||||||
<u-icon size="34" name="kefu-ermai"></u-icon>
|
<u-icon size="34" name="kefu-ermai"></u-icon>
|
||||||
<view class="icon-btn-name">客服</view>
|
<view class="icon-btn-name">客服</view>
|
||||||
@@ -293,7 +287,7 @@ import PromotionAssembleListLayout from "./product/promotion/-promotion-assemble
|
|||||||
import PromotionCoupon from "./product/promotion/-promotion-coupon"; //优惠券组件
|
import PromotionCoupon from "./product/promotion/-promotion-coupon"; //优惠券组件
|
||||||
import GoodsIntro from "./product/goods/-goods-intro"; //商品介绍组件
|
import GoodsIntro from "./product/goods/-goods-intro"; //商品介绍组件
|
||||||
import GoodsRecommend from "./product/goods/-goods-recommend"; //宝贝推荐
|
import GoodsRecommend from "./product/goods/-goods-recommend"; //宝贝推荐
|
||||||
import storeLayout from "./product/shop/-shop"; //店铺组件
|
|
||||||
import Evaluation from "./product/evaluation/-evaluation"; //评价组件
|
import Evaluation from "./product/evaluation/-evaluation"; //评价组件
|
||||||
import GoodsSwiper from "./product/goods/-goods-swiper"; //轮播图组件
|
import GoodsSwiper from "./product/goods/-goods-swiper"; //轮播图组件
|
||||||
import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
||||||
@@ -314,7 +308,7 @@ export default {
|
|||||||
PromotionCoupon,
|
PromotionCoupon,
|
||||||
GoodsIntro,
|
GoodsIntro,
|
||||||
GoodsRecommend,
|
GoodsRecommend,
|
||||||
storeLayout,
|
|
||||||
Evaluation,
|
Evaluation,
|
||||||
GoodsSwiper,
|
GoodsSwiper,
|
||||||
popupGoods,
|
popupGoods,
|
||||||
@@ -625,7 +619,7 @@ export default {
|
|||||||
|
|
||||||
linkMsgDetail () {
|
linkMsgDetail () {
|
||||||
// lili 基础客服
|
// lili 基础客服
|
||||||
this.$options.filters.talkIm(this.goodsDetail.storeId, this.routerVal.goodsId, this.routerVal.id)
|
this.$options.filters.talkIm(this.goodsDetail.storeId, this.routerVal.goodsId, this.routerVal.id,this.goodsDetail)
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}`
|
// url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}`
|
||||||
// });
|
// });
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
<u-image width="120rpx" mode="aspectFit" height="120rpx" :src="storeDetail.storeLogo"></u-image>
|
<u-image width="120rpx" mode="aspectFit" height="120rpx" :src="storeDetail.storeLogo"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name-star star-con">
|
<view class="name-star star-con">
|
||||||
<div class="name">
|
|
||||||
{{ storeDetail.storeName }}
|
|
||||||
<span v-if="storeDetail.selfOperated == 1" class="shopTag">自营</span>
|
|
||||||
</div>
|
|
||||||
<div class="store-row">
|
<div class="store-row">
|
||||||
<div class="collectionNum">{{ storeDetail.collectionNum || 0 }}人关注</div>
|
<div class="collectionNum">{{ storeDetail.collectionNum || 0 }}人关注</div>
|
||||||
<div class="goodsNum">{{ storeDetail.goodsNum || 0 }}件商品</div>
|
<div class="goodsNum">{{ storeDetail.goodsNum || 0 }}件商品</div>
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
</u-image>
|
</u-image>
|
||||||
</div>
|
</div>
|
||||||
<div class="store-msg">
|
<div class="store-msg">
|
||||||
<div class="store-name">
|
|
||||||
{{item.storeName}}
|
|
||||||
</div>
|
|
||||||
<div class="goods-num">
|
<div class="goods-num">
|
||||||
商品 {{item.goodsNum}}
|
商品 {{item.goodsNum}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,24 +19,8 @@
|
|||||||
:key="index">
|
:key="index">
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view class="store-line">
|
<view class="store-line">
|
||||||
<u-checkbox-group class="store-line-check">
|
|
||||||
<!-- #ifndef MP-WEIXIN -->
|
|
||||||
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
|
|
||||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
|
||||||
<!-- #endif -->
|
|
||||||
<!-- 微信小程序这里 v-model出现问题,改用:value -->
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<u-checkbox shape="circle" :active-color="lightColor" :value="item.checked"
|
|
||||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
|
||||||
<!-- #endif -->
|
|
||||||
</u-checkbox-group>
|
|
||||||
<span class="store-name wes store-line-desc" @click.stop="navigateToStore(item)">{{
|
|
||||||
item.storeName
|
|
||||||
}}</span>
|
|
||||||
<u-icon @click="navigateToStore(item)" size="24" style="margin-left:10rpx;" name="arrow-right"></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="right-col" v-if="item.canReceiveCoupon" @click="navigateToCoupon(item)">
|
<view class="right-col" v-if="item.canReceiveCoupon" @click="navigateToCoupon(item)">
|
||||||
<div class="right-line"></div>
|
|
||||||
<span>领劵</span>
|
<span>领劵</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -91,12 +91,6 @@
|
|||||||
<view>关于</view>
|
<view>关于</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/passport/entry/seller/index')">
|
|
||||||
<image src="/static/mine/feedback.png" mode=""></image>
|
|
||||||
<view>店铺入驻</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||||
<image src="/static/mine/setting.png" mode=""></image>
|
<image src="/static/mine/setting.png" mode=""></image>
|
||||||
<view>设置</view>
|
<view>设置</view>
|
||||||
|
|||||||
3
uni.scss
3
uni.scss
@@ -153,6 +153,9 @@ $font-weight: 400;
|
|||||||
.flex-j-sb{
|
.flex-j-sb{
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.flex-j-c{
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.relative {
|
.relative {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
157
utils/filters.js
157
utils/filters.js
@@ -10,7 +10,7 @@ import Foundation from "./Foundation.js";
|
|||||||
* @param location
|
* @param location
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function unitPrice (val, unit, location) {
|
export function unitPrice(val, unit, location) {
|
||||||
if (!val) val = 0;
|
if (!val) val = 0;
|
||||||
let price = Foundation.formatPrice(val);
|
let price = Foundation.formatPrice(val);
|
||||||
if (location === "before") {
|
if (location === "before") {
|
||||||
@@ -27,7 +27,7 @@ export function unitPrice (val, unit, location) {
|
|||||||
* @param {*} val
|
* @param {*} val
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function goodsFormatPrice (val) {
|
export function goodsFormatPrice(val) {
|
||||||
if (typeof val == "undefined") {
|
if (typeof val == "undefined") {
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ export function goodsFormatPrice (val) {
|
|||||||
* 将内容复制到粘贴板
|
* 将内容复制到粘贴板
|
||||||
*/
|
*/
|
||||||
import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js";
|
import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js";
|
||||||
export function setClipboard (val) {
|
export function setClipboard(val) {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
if (val === null || val === undefined) {
|
if (val === null || val === undefined) {
|
||||||
val = "";
|
val = "";
|
||||||
@@ -76,7 +76,7 @@ export function setClipboard (val) {
|
|||||||
* 拨打电话
|
* 拨打电话
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function callPhone (phoneNumber) {
|
export function callPhone(phoneNumber) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: phoneNumber,
|
phoneNumber: phoneNumber,
|
||||||
});
|
});
|
||||||
@@ -86,7 +86,7 @@ export function callPhone (phoneNumber) {
|
|||||||
* 脱敏姓名
|
* 脱敏姓名
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function noPassByName (str) {
|
export function noPassByName(str) {
|
||||||
if (null != str && str != undefined) {
|
if (null != str && str != undefined) {
|
||||||
if (str.length <= 3) {
|
if (str.length <= 3) {
|
||||||
return "*" + str.substring(1, str.length);
|
return "*" + str.substring(1, str.length);
|
||||||
@@ -106,7 +106,7 @@ export function noPassByName (str) {
|
|||||||
* @param format
|
* @param format
|
||||||
* @returns {*|string}
|
* @returns {*|string}
|
||||||
*/
|
*/
|
||||||
export function unixToDate (unix, format) {
|
export function unixToDate(unix, format) {
|
||||||
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
||||||
const d = new Date(unix * 1000);
|
const d = new Date(unix * 1000);
|
||||||
const o = {
|
const o = {
|
||||||
@@ -137,7 +137,7 @@ export function unixToDate (unix, format) {
|
|||||||
*
|
*
|
||||||
* @param {Object} datetime
|
* @param {Object} datetime
|
||||||
*/
|
*/
|
||||||
export function beautifyTime (datetime = "") {
|
export function beautifyTime(datetime = "") {
|
||||||
if (datetime == null || datetime == undefined || !datetime) {
|
if (datetime == null || datetime == undefined || !datetime) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ export function beautifyTime (datetime = "") {
|
|||||||
return `${minutes}分钟前`;
|
return `${minutes}分钟前`;
|
||||||
}
|
}
|
||||||
// 时间转换
|
// 时间转换
|
||||||
function timestampToTime (timestamp) {
|
function timestampToTime(timestamp) {
|
||||||
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||||
var Y = date.getFullYear() + '-';
|
var Y = date.getFullYear() + '-';
|
||||||
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
@@ -203,7 +203,7 @@ function timestampToTime (timestamp) {
|
|||||||
* @param mobile
|
* @param mobile
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function secrecyMobile (mobile) {
|
export function secrecyMobile(mobile) {
|
||||||
mobile = String(mobile);
|
mobile = String(mobile);
|
||||||
if (!/\d{11}/.test(mobile)) {
|
if (!/\d{11}/.test(mobile)) {
|
||||||
return mobile;
|
return mobile;
|
||||||
@@ -216,7 +216,7 @@ export function secrecyMobile (mobile) {
|
|||||||
*
|
*
|
||||||
* @param {Object} datetime
|
* @param {Object} datetime
|
||||||
*/
|
*/
|
||||||
export function formatTime (datetime) {
|
export function formatTime(datetime) {
|
||||||
if (datetime == null) return "";
|
if (datetime == null) return "";
|
||||||
|
|
||||||
datetime = datetime.replace(/-/g, "/");
|
datetime = datetime.replace(/-/g, "/");
|
||||||
@@ -271,7 +271,7 @@ export function formatTime (datetime) {
|
|||||||
* @param {String} cFormat
|
* @param {String} cFormat
|
||||||
* @returns {String | null}
|
* @returns {String | null}
|
||||||
*/
|
*/
|
||||||
export function parseTime (time, cFormat) {
|
export function parseTime(time, cFormat) {
|
||||||
if (arguments.length === 0) {
|
if (arguments.length === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ export function parseTime (time, cFormat) {
|
|||||||
* 清除逗号
|
* 清除逗号
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function clearStrComma (str) {
|
export function clearStrComma(str) {
|
||||||
str = str.replace(/,/g, ""); //取消字符串中出现的所有逗号
|
str = str.replace(/,/g, ""); //取消字符串中出现的所有逗号
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ export function clearStrComma (str) {
|
|||||||
* @param val 如果为auth则判断是否登录
|
* @param val 如果为auth则判断是否登录
|
||||||
* 如果传入 auth 则为判断是否登录
|
* 如果传入 auth 则为判断是否登录
|
||||||
*/
|
*/
|
||||||
export function isLogin (val) {
|
export function isLogin(val) {
|
||||||
let userInfo = storage.getUserInfo();
|
let userInfo = storage.getUserInfo();
|
||||||
if (val == "auth") {
|
if (val == "auth") {
|
||||||
return userInfo && userInfo.id ? true : false;
|
return userInfo && userInfo.id ? true : false;
|
||||||
@@ -343,12 +343,12 @@ export function isLogin (val) {
|
|||||||
* 退出登录
|
* 退出登录
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function quiteLoginOut () {
|
export function quiteLoginOut() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否退出登录?",
|
content: "是否退出登录?",
|
||||||
confirmColor: Vue.prototype.$mainColor,
|
confirmColor: Vue.prototype.$mainColor,
|
||||||
async success (res) {
|
async success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
storage.setAccessToken("");
|
storage.setAccessToken("");
|
||||||
storage.setRefreshToken("");
|
storage.setRefreshToken("");
|
||||||
@@ -365,12 +365,12 @@ export function quiteLoginOut () {
|
|||||||
* 用户注销
|
* 用户注销
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function logoff () {
|
export function logoff() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "确认注销用户么?注销用户将无法再次登录并失去当前数据就。根据法规数据最长保留6个月,期间可以联系客服人员进行恢复数据。",
|
content: "确认注销用户么?注销用户将无法再次登录并失去当前数据就。根据法规数据最长保留6个月,期间可以联系客服人员进行恢复数据。",
|
||||||
confirmColor: Vue.prototype.$mainColor,
|
confirmColor: Vue.prototype.$mainColor,
|
||||||
async success (res) {
|
async success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
await logoffConfirm();
|
await logoffConfirm();
|
||||||
storage.setAccessToken("");
|
storage.setAccessToken("");
|
||||||
@@ -382,24 +382,93 @@ export function logoff () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import { getImSetting } from '@/api/im.js'
|
||||||
/**
|
/**
|
||||||
* 跳转im
|
* 跳转im
|
||||||
*/
|
*/
|
||||||
export function talkIm (storeId, goodsId, id) {
|
export async function talkIm(storeId, goodsId, id,goodsDetail) {
|
||||||
if (isLogin('auth')) {
|
if (isLogin('auth')) {
|
||||||
let url = `/pages/mine/im/index?userId=${storeId}`
|
try {
|
||||||
if(goodsId && id) url = `/pages/mine/im/index?userId=${storeId}&goodsid=${goodsId}&skuid=${id}`
|
const res = await getImSetting()
|
||||||
uni.navigateTo({
|
if (res.data.success) {
|
||||||
url
|
let setting = res.data.result
|
||||||
});
|
|
||||||
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||||
|
let curRoute = routes[routes.length - 1].route //获取当前页面路由
|
||||||
|
let curParam = routes[routes.length - 1].options; //获取路由参数
|
||||||
|
// 拼接参数
|
||||||
|
let param = ''
|
||||||
|
for (let key in curParam) {
|
||||||
|
param += '&' + key + '=' + curParam[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
window.location.href = setting.url;
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
let sweixin = null
|
||||||
|
plus.share.getServices(res => {
|
||||||
|
sweixin = res.find(i => i.id === 'weixin')
|
||||||
|
if (sweixin) {
|
||||||
|
sweixin.openCustomerServiceChat({
|
||||||
|
corpid: setting.companyId,
|
||||||
|
url: setting.url,
|
||||||
|
}, suc => {
|
||||||
|
console.log("success", JSON.stringify(res))
|
||||||
|
}, err => {
|
||||||
|
console.log("error", JSON.stringify(err))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
plus.nativeUI.alert('当前环境不支持微信操作!')
|
||||||
|
}
|
||||||
|
}, function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: "获取服务失败,不支持该操作。" + JSON.stringify(e),
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// plus.runtime.openURL('https://work.weixin.qq.com/kfid/kfcda2f3a9985de16f7', function(res) {});
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
if (wx.openCustomerServiceChat) {
|
||||||
|
console.log(curRoute + param)
|
||||||
|
wx.openCustomerServiceChat({
|
||||||
|
extInfo: { url: setting.url },
|
||||||
|
corpId: setting.companyId,
|
||||||
|
sendMessageImg: goodsDetail.goodsGalleryList[0],
|
||||||
|
sendMessagePath: curRoute + param,
|
||||||
|
sendMessageTitle: goodsDetail.goodsName,
|
||||||
|
showMessageCard: true,
|
||||||
|
success(res) {
|
||||||
|
console.log("res", res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '网络错误请稍后重试',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tipsToLogin()
|
tipsToLogin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function tipsToLogin (type) {
|
export function tipsToLogin(type) {
|
||||||
if (!isLogin("auth")) {
|
if (!isLogin("auth")) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
@@ -409,9 +478,12 @@ export function tipsToLogin (type) {
|
|||||||
confirmColor: Vue.prototype.$mainColor,
|
confirmColor: Vue.prototype.$mainColor,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
navigateToLogin();
|
// navigateToLogin();
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/passport/login",
|
||||||
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
if(type !== 'normal'){
|
if (type !== 'normal') {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +498,7 @@ export function tipsToLogin (type) {
|
|||||||
/**
|
/**
|
||||||
* 获取用户信息并重新添加到缓存里面
|
* 获取用户信息并重新添加到缓存里面
|
||||||
*/
|
*/
|
||||||
export async function userInfo () {
|
export async function userInfo() {
|
||||||
let res = await getUserInfo();
|
let res = await getUserInfo();
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
storage.setUserInfo(res.data.result);
|
storage.setUserInfo(res.data.result);
|
||||||
@@ -440,7 +512,7 @@ export async function userInfo () {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function forceLogin () {
|
export function forceLogin() {
|
||||||
let userInfo = storage.getUserInfo();
|
let userInfo = storage.getUserInfo();
|
||||||
if (!userInfo || !userInfo.id) {
|
if (!userInfo || !userInfo.id) {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
@@ -465,7 +537,7 @@ export function forceLogin () {
|
|||||||
* 获取当前加载的页面对象
|
* 获取当前加载的页面对象
|
||||||
* @param val
|
* @param val
|
||||||
*/
|
*/
|
||||||
export function getPages (val) {
|
export function getPages(val) {
|
||||||
const pages = getCurrentPages(); //获取加载的页面
|
const pages = getCurrentPages(); //获取加载的页面
|
||||||
const currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
const currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
||||||
const url = currentPage.route; //当前页面url
|
const url = currentPage.route; //当前页面url
|
||||||
@@ -476,7 +548,7 @@ export function getPages (val) {
|
|||||||
/**
|
/**
|
||||||
* 跳转到登录页面
|
* 跳转到登录页面
|
||||||
*/
|
*/
|
||||||
export function navigateToLogin (type = "navigateTo") {
|
export function navigateToLogin(type = "navigateTo") {
|
||||||
/**
|
/**
|
||||||
* 此处进行条件编译判断
|
* 此处进行条件编译判断
|
||||||
* 微信小程序跳转到微信小程序登录页面
|
* 微信小程序跳转到微信小程序登录页面
|
||||||
@@ -497,7 +569,7 @@ export function navigateToLogin (type = "navigateTo") {
|
|||||||
/**
|
/**
|
||||||
* 服务状态列表
|
* 服务状态列表
|
||||||
*/
|
*/
|
||||||
export function serviceStatusList (val) {
|
export function serviceStatusList(val) {
|
||||||
let statusList = {
|
let statusList = {
|
||||||
APPLY: "申请售后",
|
APPLY: "申请售后",
|
||||||
PASS: "通过售后",
|
PASS: "通过售后",
|
||||||
@@ -517,11 +589,12 @@ export function serviceStatusList (val) {
|
|||||||
/**
|
/**
|
||||||
* 订单状态列表
|
* 订单状态列表
|
||||||
*/
|
*/
|
||||||
export function orderStatusList (val) {
|
export function orderStatusList(val) {
|
||||||
let orderStatusList = {
|
let orderStatusList = {
|
||||||
UNDELIVERED: "待发货",
|
UNDELIVERED: "待发货",
|
||||||
UNPAID: "未付款",
|
UNPAID: "未付款",
|
||||||
PAID: "已付款",
|
PAID: "已付款",
|
||||||
|
PARTS_DELIVERED: "部分发货",
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
CANCELLED: "已取消",
|
CANCELLED: "已取消",
|
||||||
COMPLETED: "已完成",
|
COMPLETED: "已完成",
|
||||||
@@ -531,3 +604,21 @@ export function orderStatusList (val) {
|
|||||||
};
|
};
|
||||||
return orderStatusList[val];
|
return orderStatusList[val];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 比较版本
|
||||||
|
export function compareVersions(str1, str2) {
|
||||||
|
const arr1 = str1.split('.').map(Number);
|
||||||
|
const arr2 = str2.split('.').map(Number);
|
||||||
|
|
||||||
|
const length = Math.max(arr1.length, arr2.length);
|
||||||
|
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
if (arr1[i] > arr2[i]) {
|
||||||
|
return 1;
|
||||||
|
} else if (arr1[i] < arr2[i]) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user