parent
83d81031e3
commit
5a25680bf7
|
|
@ -19,6 +19,8 @@ export function getCouponTemplateList(spuId, useType) {
|
||||||
return request.get("app-api/promotion/coupon-template/list", {
|
return request.get("app-api/promotion/coupon-template/list", {
|
||||||
spuId,
|
spuId,
|
||||||
useType
|
useType
|
||||||
|
}, {
|
||||||
|
noAuth: true // TODO 芋艿:后续要做调整
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import request from "@/utils/request.js";
|
||||||
|
|
||||||
|
export function getDecorateComponentListByPage(page) {
|
||||||
|
return request.get("app-api/promotion/decorate/list", {
|
||||||
|
page
|
||||||
|
}, {
|
||||||
|
noAuth: true // TODO 芋艿:后续要做调整
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -53,3 +53,9 @@ export function getOrderItem(id) {
|
||||||
export function createOrderItemComment(data) {
|
export function createOrderItemComment(data) {
|
||||||
return request.post("app-api/trade/order/item/create-comment", data);
|
return request.post("app-api/trade/order/item/create-comment", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOrderExpressTrackList(id) {
|
||||||
|
return request.get("app-api/trade/order/get-express-track-list", {
|
||||||
|
id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
// let domain = 'http://apif.java.crmeb.net'
|
let domain = 'http://apif.java.crmeb.net'
|
||||||
let domain = 'http://127.0.0.1:48080'
|
// let domain = 'http://127.0.0.1:48080'
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 请求域名 格式: https://您的域名
|
// 请求域名 格式: https://您的域名
|
||||||
|
|
|
||||||
|
|
@ -31,15 +31,15 @@
|
||||||
<!-- 首页展示 -->
|
<!-- 首页展示 -->
|
||||||
<view class="page_content" :style="'margin-top:'+(marTop)+'px;'" v-if="navIndex === 0">
|
<view class="page_content" :style="'margin-top:'+(marTop)+'px;'" v-if="navIndex === 0">
|
||||||
<view class="mp-bg"></view>
|
<view class="mp-bg"></view>
|
||||||
<!-- banner -->
|
<!-- banner 轮播图 -->
|
||||||
<view class="swiper" v-if="imgUrls.length">
|
<view class="swiper" v-if="slideShows.length">
|
||||||
<swiper indicator-dots="true" :autoplay="true" :circular="circular" :interval="interval"
|
<swiper indicator-dots="true" :autoplay="true" :circular="circular" :interval="interval"
|
||||||
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||||
<block v-for="(item,index) in imgUrls" :key="index">
|
<block v-for="(item,index) in slideShows" :key="index">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper'
|
<navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper'
|
||||||
hover-class='none'>
|
hover-class='none'>
|
||||||
<image :src="item.pic" class="slide-image" lazy-load></image>
|
<image :src="item.picUrl" class="slide-image" lazy-load></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 新闻简报 -->
|
<!-- 新闻简报 -->
|
||||||
<view class='notice acea-row row-middle row-between' v-if="roll.length">
|
<view class='notice acea-row row-middle row-between' v-if="scrollingNews.length">
|
||||||
<view class="pic">
|
<view class="pic">
|
||||||
<image src="/static/images/xinjian.png" />
|
<image src="/static/images/xinjian.png" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -55,10 +55,10 @@
|
||||||
<view class='swipers'>
|
<view class='swipers'>
|
||||||
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500" duration="500"
|
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500" duration="500"
|
||||||
vertical="true" circular="true">
|
vertical="true" circular="true">
|
||||||
<block v-for="(item,index) in roll" :key='index'>
|
<block v-for="(item,index) in scrollingNews" :key='index'>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<navigator class='item' :url='item.url' hover-class='none'>
|
<navigator class='item' :url='item.url' hover-class='none'>
|
||||||
<view class='line1'>{{item.info}}</view>
|
<view class='line1'>{{ item.name }}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
|
|
@ -67,19 +67,19 @@
|
||||||
<view class="iconfont icon-xiangyou" />
|
<view class="iconfont icon-xiangyou" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- menu -->
|
<!-- menu 菜单 -->
|
||||||
<view class='nav acea-row' v-if="menus.length">
|
<view class='nav acea-row' v-if="menus.length">
|
||||||
<block v-for="(item,index) in menus" :key="index">
|
<block v-for="(item,index) in menus" :key="index">
|
||||||
<navigator class='item' v-if="item.show === '1'" :url='item.url' open-type='switchTab'
|
<navigator class='item' v-if="item.show === '1'" :url='item.url' open-type='switchTab'
|
||||||
hover-class='none'>
|
hover-class='none'>
|
||||||
<view class='pictrue'>
|
<view class='pictrue'>
|
||||||
<image :src='item.pic'></image>
|
<image :src='item.picUrl'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-txt">{{item.name}}</view>
|
<view class="menu-txt">{{item.name}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator class='item' v-else :url='item.url' hover-class='none'>
|
<navigator class='item' v-else :url='item.url' hover-class='none'>
|
||||||
<view class='pictrue'>
|
<view class='pictrue'>
|
||||||
<image :src='item.pic'></image>
|
<image :src='item.picUrl'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-txt">{{item.name}}</view>
|
<view class="menu-txt">{{item.name}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
@ -124,9 +124,9 @@
|
||||||
:scroll-left="tabsScrollLeft" @scroll="scroll">
|
:scroll-left="tabsScrollLeft" @scroll="scroll">
|
||||||
<view class="tab nav-bd" id="tab_list">
|
<view class="tab nav-bd" id="tab_list">
|
||||||
<view id="tab_item" :class="{ 'active': listActive === index}" class="item"
|
<view id="tab_item" :class="{ 'active': listActive === index}" class="item"
|
||||||
v-for="(item, index) in explosiveMoney" :key="index" @click="ProductNavTab(item,index)">
|
v-for="(item, index) in productRecommends" :key="index" @click="ProductNavTab(item,index)">
|
||||||
<view class="txt">{{item.name}}</view>
|
<view class="txt">{{item.name}}</view>
|
||||||
<view class="label">{{item.info}}</view>
|
<view class="label">{{item.tag}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
@ -168,8 +168,6 @@
|
||||||
import Cache from '../../utils/cache';
|
import Cache from '../../utils/cache';
|
||||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||||
let app = getApp();
|
let app = getApp();
|
||||||
import { getIndexData } from '@/api/api.js';
|
|
||||||
import { getShare } from '@/api/public.js';
|
|
||||||
import a_seckill from './components/a_seckill';
|
import a_seckill from './components/a_seckill';
|
||||||
import b_combination from './components/b_combination';
|
import b_combination from './components/b_combination';
|
||||||
import c_bargain from './components/c_bargain';
|
import c_bargain from './components/c_bargain';
|
||||||
|
|
@ -184,9 +182,9 @@
|
||||||
import * as ProductSpuApi from '@/api/product/spu.js';
|
import * as ProductSpuApi from '@/api/product/spu.js';
|
||||||
import * as PromotionActivityApi from '@/api/promotion/activity.js';
|
import * as PromotionActivityApi from '@/api/promotion/activity.js';
|
||||||
import * as CouponApi from '@/api/promotion/coupon.js';
|
import * as CouponApi from '@/api/promotion/coupon.js';
|
||||||
|
import * as DecorateApi from '@/api/promotion/decorate.js';
|
||||||
import * as ProductUtil from '@/utils/product.js';
|
import * as ProductUtil from '@/utils/product.js';
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
const arrTemp = ["beforePay", "afterPay", "refundApply", "beforeRecharge", "createBargain", "pink"];
|
|
||||||
export default {
|
export default {
|
||||||
computed: mapGetters(['isLogin', 'uid']),
|
computed: mapGetters(['isLogin', 'uid']),
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -204,23 +202,25 @@
|
||||||
statusBarHeight: statusBarHeight,
|
statusBarHeight: statusBarHeight,
|
||||||
navIndex: 0,
|
navIndex: 0,
|
||||||
navTop: [],
|
navTop: [],
|
||||||
logoUrl: "",
|
|
||||||
imgUrls: [],
|
|
||||||
menus: [],
|
|
||||||
indicatorDots: false,
|
|
||||||
circular: true,
|
|
||||||
autoplay: true,
|
|
||||||
interval: 3000,
|
|
||||||
duration: 500,
|
|
||||||
couponList: [],
|
|
||||||
marTop: 0,
|
marTop: 0,
|
||||||
explosiveMoney: [],
|
configApi: {}, // 分享类容配置
|
||||||
roll: [], // 新闻简报
|
tabsScrollLeft: 0, // tabs 当前偏移量
|
||||||
site_name: '', //首页title
|
|
||||||
configApi: {}, //分享类容配置
|
|
||||||
tabsScrollLeft: 0, // tabs当前偏移量
|
|
||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
|
|
||||||
|
slideShows: [], // 轮播图
|
||||||
|
circular: true,
|
||||||
|
interval: 3000,
|
||||||
|
duration: 500,
|
||||||
|
menus: [], // 菜单
|
||||||
|
scrollingNews: [], // 新闻简报
|
||||||
|
indicatorDots: false,
|
||||||
|
autoplay: true,
|
||||||
|
couponList: [], // 优惠劵列表
|
||||||
|
productRecommends: [], // 商品推荐
|
||||||
|
|
||||||
|
site_name: '首页', // 首页 title
|
||||||
|
logoUrl: "",
|
||||||
|
|
||||||
// ========== 精品推荐 ===========
|
// ========== 精品推荐 ===========
|
||||||
goodScroll: true, // 精品推荐开关
|
goodScroll: true, // 精品推荐开关
|
||||||
listActive: 0, // 当前选中项
|
listActive: 0, // 当前选中项
|
||||||
|
|
@ -273,9 +273,8 @@
|
||||||
this.getIndexConfig();
|
this.getIndexConfig();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let self = this
|
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: self.site_name
|
title: this.site_name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -310,34 +309,60 @@
|
||||||
// 首页数据
|
// 首页数据
|
||||||
getIndexConfig: function() {
|
getIndexConfig: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getIndexData().then(res => {
|
DecorateApi.getDecorateComponentListByPage(1).then(res => {
|
||||||
|
// TODO 芋艿:暂时写死
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '首页'
|
title: '首页'
|
||||||
})
|
})
|
||||||
that.$set(that, "logoUrl", res.data.logoUrl);
|
this.$set(this, "logoUrl", 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png');
|
||||||
that.$set(that, "site_name", '首页');
|
this.$set(this, "site_name", '首页');
|
||||||
that.$set(that, "imgUrls", res.data.banner);
|
// #ifdef H5
|
||||||
that.$set(that, "menus", res.data.menus);
|
this.$store.commit("SET_CHATURL", 'https://cschat.antcloud.com.cn/index.htm?tntInstId=jm7_c46J&scene=SCE01197657');
|
||||||
that.$set(that, "roll", res.data.roll ? res.data.roll : []);
|
Cache.set('chatUrl', 'https://cschat.antcloud.com.cn/index.htm?tntInstId=jm7_c46J&scene=SCE01197657');
|
||||||
// #ifdef H5
|
// #endif
|
||||||
that.$store.commit("SET_CHATURL", res.data.yzfUrl);
|
|
||||||
Cache.set('chatUrl', res.data.yzfUrl);
|
// 轮播图
|
||||||
// #endif
|
const slideShow = res.data.find(item => item.code === 'slide-show');
|
||||||
that.$set(that, "explosiveMoney", res.data.explosiveMoney);
|
if (slideShow) {
|
||||||
that.goodType = parseInt(res.data.explosiveMoney[0].type)
|
this.$set(this, "slideShows", JSON.parse(slideShow.value));
|
||||||
this.getGroomList();
|
}
|
||||||
this.shareApi();
|
// 菜单
|
||||||
this.getcouponList();
|
const menu = res.data.find(item => item.code === 'menu');
|
||||||
|
if (menu) {
|
||||||
|
this.$set(this, "menus", JSON.parse(menu.value));
|
||||||
|
}
|
||||||
|
// 滚动新闻
|
||||||
|
const scrollingNews = res.data.find(item => item.code === 'scrolling-news');
|
||||||
|
if (scrollingNews) {
|
||||||
|
this.$set(this, "scrollingNews", JSON.parse(scrollingNews.value));
|
||||||
|
}
|
||||||
|
// 商品推荐
|
||||||
|
const productRecommend = res.data.find(item => item.code === 'product-recommend');
|
||||||
|
if (productRecommend) {
|
||||||
|
this.$set(this, "productRecommends", JSON.parse(productRecommend.value));
|
||||||
|
if (this.productRecommends.length > 0) {
|
||||||
|
this.goodType = this.productRecommends[0].type
|
||||||
|
this.getGroomList();
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
// 获得分享配置
|
||||||
|
this.shareApi();
|
||||||
|
// 获得优惠劵列表
|
||||||
|
this.getcouponList();
|
||||||
},
|
},
|
||||||
|
|
||||||
shareApi: function() {
|
shareApi: function() {
|
||||||
getShare().then(res => {
|
// TODO 芋艿:写死
|
||||||
this.$set(this, 'configApi', res.data);
|
const configApi = {
|
||||||
// #ifdef H5
|
"title": "芋道商城",
|
||||||
this.setOpenShare(res.data);
|
"synopsis": "芋道商城,好用!",
|
||||||
// #endif
|
"img": "https://api.java.crmeb.net/crmebimage/public/operation/2021/09/23/61fc3e4a49844fa69c12812ce5d57641bfkfzjqh1q.png"
|
||||||
})
|
}
|
||||||
|
this.$set(this, 'configApi', configApi);
|
||||||
|
// #ifdef H5
|
||||||
|
this.setOpenShare(configApi);
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
// 微信分享;
|
// 微信分享;
|
||||||
setOpenShare: function(data) {
|
setOpenShare: function(data) {
|
||||||
|
|
@ -349,8 +374,7 @@
|
||||||
link: location.href,
|
link: location.href,
|
||||||
imgUrl: data.img
|
imgUrl: data.img
|
||||||
};
|
};
|
||||||
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
|
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
|
||||||
configAppMessage);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -389,7 +413,7 @@
|
||||||
*/
|
*/
|
||||||
ProductNavTab(item, index) {
|
ProductNavTab(item, index) {
|
||||||
this.listActive = index
|
this.listActive = index
|
||||||
this.goodType = parseInt(item.type)
|
this.goodType = item.type
|
||||||
this.listActive = index
|
this.listActive = index
|
||||||
this.tempArr = []
|
this.tempArr = []
|
||||||
this.params.page = 1
|
this.params.page = 1
|
||||||
|
|
@ -407,13 +431,8 @@
|
||||||
this.iSshowH = true
|
this.iSshowH = true
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const type = this.goodType === 1 ? 'best' :
|
|
||||||
this.goodType === 2 ? 'hot' :
|
|
||||||
this.goodType === 3 ? 'new' :
|
|
||||||
this.goodType === 4 ? 'benefit':
|
|
||||||
this.goodType === 5 ? 'good': ''
|
|
||||||
ProductSpuApi.getSpuPage({
|
ProductSpuApi.getSpuPage({
|
||||||
recommendType: type,
|
recommendType: this.goodType,
|
||||||
pageNo: this.params.page,
|
pageNo: this.params.page,
|
||||||
pageSize: this.params.limit
|
pageSize: this.params.limit
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -271,8 +271,7 @@
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- TODO 芋艿:拼团 -->
|
<!-- TODO 芋艿:拼团 -->
|
||||||
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
|
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
|
||||||
<!-- TODO 芋艿:物流 -->
|
<navigator class='bnt cancel' v-if="orderInfo.logisticsId > 0"
|
||||||
<navigator class='bnt cancel' v-if="orderInfo.deliveryType === 2 && orderInfo.status > 0"
|
|
||||||
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">
|
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">
|
||||||
查看物流
|
查看物流
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
@ -305,7 +304,6 @@
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import dayjs from '@/plugin/dayjs/dayjs.min.js';
|
import dayjs from '@/plugin/dayjs/dayjs.min.js';
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
import {receiveOrder} from "../../api/trade/order";
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
payment,
|
payment,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
<view class='copy copy-data' :data-clipboard-text="orderInfo.deliveryId">复制单号</view>
|
<view class='copy copy-data' :data-clipboard-text="orderInfo.deliveryId">复制单号</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 物流轨迹 -->
|
||||||
<view class='item' v-for="(item,index) in expressList" :key="index">
|
<view class='item' v-for="(item,index) in expressList" :key="index">
|
||||||
<view class='circular' :class='index === 0 ? "on":""'></view>
|
<view class='circular' :class='index === 0 ? "on":""'></view>
|
||||||
<view class='text' :class='index===0 ? "on-font on":""'>
|
<view class='text' :class='index===0 ? "on-font on":""'>
|
||||||
|
|
@ -37,38 +39,22 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
|
<recommend :hostProduct='hostProduct' v-if="hostProduct.length" />
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
|
||||||
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { express } from '@/api/order.js';
|
||||||
express
|
import { getProductHot } from '@/api/store.js';
|
||||||
} from '@/api/order.js';
|
|
||||||
import {
|
|
||||||
getProductHot
|
|
||||||
} from '@/api/store.js';
|
|
||||||
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
|
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
|
||||||
import {
|
import { toLogin } from '@/libs/login.js';
|
||||||
toLogin
|
import { mapGetters } from "vuex";
|
||||||
} from '@/libs/login.js';
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
import recommend from '@/components/recommend';
|
import recommend from '@/components/recommend';
|
||||||
// #ifdef MP
|
import * as OrderApi from '@/api/trade/order.js';
|
||||||
import authorize from '@/components/Authorize';
|
export default {
|
||||||
// #endif
|
|
||||||
export default {
|
|
||||||
components: {
|
components: {
|
||||||
recommend,
|
recommend,
|
||||||
// #ifdef MP
|
|
||||||
authorize
|
|
||||||
// #endif
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -81,7 +67,7 @@
|
||||||
hostProduct: [],
|
hostProduct: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
goodScroll: true,
|
goodScroll: true,
|
||||||
params: { //精品推荐分页
|
params: { // 精品推荐分页
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
|
|
@ -90,8 +76,8 @@
|
||||||
computed: mapGetters(['isLogin']),
|
computed: mapGetters(['isLogin']),
|
||||||
watch:{
|
watch:{
|
||||||
isLogin:{
|
isLogin:{
|
||||||
handler:function(newV,oldV){
|
handler:function(newV, oldV) {
|
||||||
if(newV){
|
if (newV) {
|
||||||
this.getExpress();
|
this.getExpress();
|
||||||
this.get_host_product();
|
this.get_host_product();
|
||||||
}
|
}
|
||||||
|
|
@ -100,70 +86,63 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
if (!options.orderId) return this.$util.Tips({title:'缺少订单号'});
|
if (!this.isLogin) {
|
||||||
|
toLogin();
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 解析参数
|
||||||
|
if (!options.orderId) {
|
||||||
|
return this.$util.Tips({title:'缺少订单号'});
|
||||||
|
}
|
||||||
this.orderId = options.orderId;
|
this.orderId = options.orderId;
|
||||||
if (this.isLogin) {
|
this.getExpress();
|
||||||
this.getExpress();
|
this.get_host_product();
|
||||||
this.get_host_product();
|
},
|
||||||
} else {
|
onReady: function() {
|
||||||
toLogin();
|
// #ifdef H5
|
||||||
}
|
this.$nextTick(function() {
|
||||||
},
|
const clipboard = new ClipboardJS(".copy-data");
|
||||||
onReady: function() {
|
clipboard.on("success", () => {
|
||||||
// #ifdef H5
|
this.$util.Tips({
|
||||||
this.$nextTick(function() {
|
title: '复制成功'
|
||||||
const clipboard = new ClipboardJS(".copy-data");
|
});
|
||||||
clipboard.on("success", () => {
|
});
|
||||||
this.$util.Tips({
|
});
|
||||||
title: '复制成功'
|
// #endif
|
||||||
});
|
},
|
||||||
});
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
copyOrderId: function() {
|
||||||
* 授权回调
|
uni.setClipboardData({ data: this.orderInfo.deliveryId });
|
||||||
*/
|
},
|
||||||
onLoadFun: function() {
|
getExpress: function() {
|
||||||
this.getExpress();
|
OrderApi.express(this.orderId).then(res => {
|
||||||
this.get_host_product();
|
// that.$set(that,'product',res.data.order.info[0] || {});
|
||||||
},
|
// that.$set(that,'orderInfo',res.data.order);
|
||||||
copyOrderId:function(){
|
this.$set(this, 'expressList', res.data || []);
|
||||||
uni.setClipboardData({ data: this.orderInfo.deliveryId });
|
});
|
||||||
},
|
},
|
||||||
getExpress:function(){
|
get_host_product: function () {
|
||||||
let that=this;
|
this.loading = true
|
||||||
express(that.orderId).then(function(res){
|
if (!this.goodScroll) {
|
||||||
let result = res.data.express|| {};
|
return
|
||||||
that.$set(that,'product',res.data.order.info[0] || {});
|
}
|
||||||
that.$set(that,'orderInfo',res.data.order);
|
let that = this;
|
||||||
that.$set(that,'expressList',result.list || []);
|
getProductHot(that.params.page,that.params.limit).then(function (res) {
|
||||||
});
|
that.loading = false
|
||||||
},
|
that.goodScroll = res.data.list.length >= that.params.limit
|
||||||
get_host_product: function () {
|
that.params.page++
|
||||||
this.loading = true
|
that.hostProduct = that.hostProduct.concat(res.data.list)
|
||||||
if (!this.goodScroll) return
|
});
|
||||||
let that = this;
|
},
|
||||||
getProductHot(that.params.page,that.params.limit).then(function (res) {
|
|
||||||
//this.iSshowH = false
|
|
||||||
that.loading = false
|
|
||||||
that.goodScroll = res.data.list.length >= that.params.limit
|
|
||||||
that.params.page++
|
|
||||||
that.hostProduct = that.hostProduct.concat(res.data.list)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
// 滚动到底部
|
// 滚动到底部
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
if (this.params.page !== 1) {
|
||||||
if (this.params.page != 1) {
|
|
||||||
this.get_host_product();
|
this.get_host_product();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.logistics .header {
|
.logistics .header {
|
||||||
padding: 23rpx 30rpx;
|
padding: 23rpx 30rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue