chore(分包): 目录结构调整

This commit is contained in:
2025-12-26 11:03:16 +08:00
parent b01de93eee
commit e949b14090
65 changed files with 2648 additions and 2606 deletions

View File

@@ -183,7 +183,7 @@ export default {
}; };
if (this.$refs.goodsPromotion) this.$refs.goodsPromotion.refresh(this.goodsSkuDetail.goods_promotion); if (this.$refs.goodsPromotion) this.$refs.goodsPromotion.refresh(this.goodsSkuDetail.goods_promotion);
if (this.goodsRoute != '/pages/goods/detail') this.setPublicShare(); if (this.goodsRoute != '/pages_goods/detail') this.setPublicShare();
// this.getBarrageData(); // this.getBarrageData();
if (this.addonIsExist.form) { if (this.addonIsExist.form) {
@@ -244,7 +244,7 @@ export default {
}, },
goCart() { goCart() {
if (this.preview) return; // 开启预览,禁止任何操作和跳转 if (this.preview) return; // 开启预览,禁止任何操作和跳转
this.$util.redirectTo('/pages/goods/cart'); this.$util.redirectTo('/pages_goods/cart');
}, },
//-------------------------------------关注------------------------------------- //-------------------------------------关注-------------------------------------
//更新商品信息 //更新商品信息

View File

@@ -19,9 +19,36 @@ export default {
var lang = require('../../lang/' + locale + '/common.js').lang; var lang = require('../../lang/' + locale + '/common.js').lang;
//当前页面语言包 //当前页面语言包
let route = _this.route.split("/"); let route = _this.route;
newRoute = route.slice(1, route.length); let routeParts = route.split("/");
let currentPageLang = require('../../lang/' + locale + '/' + newRoute.join("/") + '.js').lang;
// 映射新的页面目录到原来的语言文件目录
if (routeParts[0] === 'pages_goods') {
routeParts[0] = 'goods';
} else if (routeParts[0] === 'pages_order') {
routeParts[0] = 'order';
} else if (routeParts[0] === 'pages_promotion' && routeParts[1] === 'point') {
// 处理积分相关的推广页面映射到point语言文件目录
routeParts = ['point', routeParts[2]];
} else if (routeParts[0] === 'pages' && routeParts[1] === 'member') {
// 处理主包中的会员中心页面映射到member目录
routeParts = ['member', routeParts[2]];
} else if (routeParts[0] === 'pages_tool') {
// 处理工具页面目录,根据子目录映射到对应的语言文件目录
if (routeParts[1] === 'member') {
routeParts = ['member', routeParts[2]];
} else if (routeParts[1] === 'order') {
routeParts = ['order', routeParts[2]];
} else if (routeParts[1] === 'goods') {
routeParts = ['goods', routeParts[2]];
} else if (routeParts[1] === 'help' || routeParts[1] === 'notice' || routeParts[1] === 'article') {
// 处理CMS相关页面
routeParts = [routeParts[1], routeParts[2]];
}
}
let langPath = routeParts.join("/");
let currentPageLang = require('../../lang/' + locale + '/' + langPath + '.js').lang;
for (let f in currentPageLang) { for (let f in currentPageLang) {
lang[f] = currentPageLang[f]; lang[f] = currentPageLang[f];
@@ -29,15 +56,20 @@ export default {
var arr = field.split("."); var arr = field.split(".");
if (arr.length > 1) { if (arr.length > 1) {
for (let i in arr) { // 处理嵌套属性,如 common.currencySymbol
var next = parseInt(i) + 1; let temp = lang;
if (next < arr.length) { let found = true;
value = lang[arr[i]][arr[next]]; for (let key of arr) {
if (temp[key] !== undefined) {
temp = temp[key];
} else {
found = false;
break;
} }
} }
value = found ? temp : field;
} else { } else {
value = lang[field]; value = lang[field] !== undefined ? lang[field] : field;
} }
} catch (e) { } catch (e) {

View File

@@ -169,12 +169,12 @@
<!-- 商品 --> <!-- 商品 -->
<view class="goods-item" v-for="(goodsItem, goodsIndex) in goodsSpecFormat(calculateGoodsData.goods_list)" :key="goodsIndex"> <view class="goods-item" v-for="(goodsItem, goodsIndex) in goodsSpecFormat(calculateGoodsData.goods_list)" :key="goodsIndex">
<view class="goods-wrap"> <view class="goods-wrap">
<view class="goods-img" @click="$util.redirectTo('/pages/goods/detail', { goods_id: goodsItem.goods_id })"> <view class="goods-img" @click="$util.redirectTo('/pages_goods/detail', { goods_id: goodsItem.goods_id })">
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(goodsIndex)" mode="aspectFill"/> <image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(goodsIndex)" mode="aspectFill"/>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view class="top-wrap"> <view class="top-wrap">
<view @click="$util.redirectTo('/pages/goods/detail', { goods_id: goodsItem.goods_id })" class="goods-name">{{ goodsItem.sku_name }}</view> <view @click="$util.redirectTo('/pages_goods/detail', { goods_id: goodsItem.goods_id })" class="goods-name">{{ goodsItem.sku_name }}</view>
<view class="sku" v-if="goodsItem.sku_spec_format"> <view class="sku" v-if="goodsItem.sku_spec_format">
<view class="goods-spec"> <view class="goods-spec">
<block v-for="(x, i) in goodsItem.sku_spec_format" :key="i"> <block v-for="(x, i) in goodsItem.sku_spec_format" :key="i">

View File

@@ -922,7 +922,7 @@ export default {
payClose() { payClose() {
// 更新购物车数量 // 更新购物车数量
this.$store.dispatch('getCartNumber'); this.$store.dispatch('getCartNumber');
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: this.$refs.choosePaymentPopup.payInfo.order_id order_id: this.$refs.choosePaymentPopup.payInfo.order_id
}, 'redirectTo'); }, 'redirectTo');
}, },

View File

@@ -4,7 +4,7 @@
<view class="tabbar-border"></view> <view class="tabbar-border"></view>
<view class="item" v-for="(item, index) in tabBarList.list" :key="item.id" @click="redirectTo(item.link)"> <view class="item" v-for="(item, index) in tabBarList.list" :key="item.id" @click="redirectTo(item.link)">
<view class="bd"> <view class="bd">
<block v-if="item.link.wap_url == '/pages/goods/cart'"> <block v-if="item.link.wap_url == '/pages_goods/cart'">
<view class="icon" v-if="tabBarList.type == 1 || tabBarList.type == 2" :animation="cartAnimation" id="tabbarCart"> <view class="icon" v-if="tabBarList.type == 1 || tabBarList.type == 2" :animation="cartAnimation" id="tabbarCart">
<block v-if="verify(item.link)"> <block v-if="verify(item.link)">
<image v-if="item.selected_icon_type == 'img'" :src="$util.img(item.selectedIconPath)" /> <image v-if="item.selected_icon_type == 'img'" :src="$util.img(item.selectedIconPath)" />
@@ -15,7 +15,7 @@
<diy-icon v-if="item.icon_type == 'icon'" :icon="item.iconPath" :value="item.style ? item.style : null"></diy-icon> <diy-icon v-if="item.icon_type == 'icon'" :icon="item.iconPath" :value="item.style ? item.style : null"></diy-icon>
</block> </block>
<view class="cart-count-mark font-size-activity-tag" <view class="cart-count-mark font-size-activity-tag"
:class="{ max: item.link.wap_url == '/pages/goods/cart' && cartNumber > 99 }" :class="{ max: item.link.wap_url == '/pages_goods/cart' && cartNumber > 99 }"
:style="{ background: 'var(--price-color)' }" v-if="cartNumber > 0"> :style="{ background: 'var(--price-color)' }" v-if="cartNumber > 0">
{{ cartNumber > 99 ? '99+' : cartNumber }} {{ cartNumber > 99 ? '99+' : cartNumber }}
</view> </view>

View File

@@ -8,7 +8,7 @@
<block v-if="value.level == 2"> <block v-if="value.level == 2">
<view class="category-title">{{ category.category_name }}</view> <view class="category-title">{{ category.category_name }}</view>
<view class="category-list"> <view class="category-list">
<view class="category-item" v-for="(one, oneIndex) in category.child_list" :key="oneIndex" @click="$util.redirectTo('/pages/goods/list', { category_id: one.category_id })"> <view class="category-item" v-for="(one, oneIndex) in category.child_list" :key="oneIndex" @click="$util.redirectTo('/pages_goods/list', { category_id: one.category_id })">
<view class="img-box"> <view class="img-box">
<image :src="$util.img(one.image)" mode="widthFix"/> <image :src="$util.img(one.image)" mode="widthFix"/>
</view> </view>
@@ -21,7 +21,7 @@
<block v-for="(one, oneIndex) in category.child_list" :key="oneIndex"> <block v-for="(one, oneIndex) in category.child_list" :key="oneIndex">
<view class="category-title">{{ one.category_name }}</view> <view class="category-title">{{ one.category_name }}</view>
<view class="category-list"> <view class="category-list">
<view class="category-item" v-for="(two, twoIndex) in one.child_list" :key="twoIndex" @click="$util.redirectTo('/pages/goods/list', { category_id: two.category_id })"> <view class="category-item" v-for="(two, twoIndex) in one.child_list" :key="twoIndex" @click="$util.redirectTo('/pages_goods/list', { category_id: two.category_id })">
<view class="img-box"> <view class="img-box">
<image :src="$util.img(two.image)" mode="widthFix" :lazy-load="true"/> <image :src="$util.img(two.image)" mode="widthFix" :lazy-load="true"/>
</view> </view>
@@ -447,7 +447,7 @@
* @param {Object} item * @param {Object} item
*/ */
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },

View File

@@ -5,7 +5,7 @@
<!-- <block v-if="value.template == 4"> <!-- <block v-if="value.template == 4">
<view class="search-box" v-if="value.search" @click="$util.redirectTo('/pages_tool/goods/search')" :style="navbarInnerStyle"> <view class="search-box" v-if="value.search" @click="$util.redirectTo('/pages_tool/goods/search')" :style="navbarInnerStyle">
<view class="search-content"> <view class="search-content">
<input type="text" class="uni-input font-size-tag" maxlength="50" :placeholder="$lang('search')" confirm-type="search" disabled="true" /> <input type="text" class="uni-input font-size-tag" maxlength="50" :placeholder="$lang('search')" confirm-type="search" @click.stop="onClickSearch()" @tap.stop="onClickSearch()" disabled="true" />
<text class="iconfont icon-sousuo3"></text> <text class="iconfont icon-sousuo3"></text>
</view> </view>
</view> </view>
@@ -13,9 +13,9 @@
</block> --> </block> -->
<block v-if="value.template != 4"> <block v-if="value.template != 4">
<!-- <view :style="navbarInnerStyle">商品分类</view> --> <!-- <view :style="navbarInnerStyle">商品分类</view> -->
<view class="search-box" v-if="value.search" @click="$util.redirectTo('/pages_tool/goods/search')" :style="wxSearchHeight"> <view class="search-box" v-if="value.search" @click="onClickSearch()" @tap.stop="onClickSearch()" :style="wxSearchHeight">
<view class="search-content"> <view class="search-content">
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')" confirm-type="search" disabled="true" /> <input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')" confirm-type="search" @click.stop="onClickSearch()" @tap.stop="onClickSearch()" disabled="true" />
<text class="iconfont icon-sousuo3"></text> <text class="iconfont icon-sousuo3"></text>
</view> </view>
<view class="iconfont" :class="{ 'icon-apps': !isList, 'icon-list': isList }" @click.stop.prevent="changeListStyle()" ></view> <view class="iconfont" :class="{ 'icon-apps': !isList, 'icon-list': isList }" @click.stop.prevent="changeListStyle()" ></view>
@@ -23,9 +23,9 @@
</block> </block>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="search-box" v-if="value.search" @click="$util.redirectTo('/pages_tool/goods/search')"> <view class="search-box" v-if="value.search" @click="onClickSearch()" @tap.stop="onClickSearch()">
<view class="search-content"> <view class="search-content">
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')" confirm-type="search" disabled="true" /> <input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')" confirm-type="search" @click.stop="onClickSearch()" @tap.stop="onClickSearch()" disabled="true" />
<text class="iconfont icon-sousuo3"></text> <text class="iconfont icon-sousuo3"></text>
</view> </view>
<view class="iconfont" :class="{ 'icon-apps': !isList, 'icon-list': isList }" @click.stop.prevent="changeListStyle()"></view> <view class="iconfont" :class="{ 'icon-apps': !isList, 'icon-list': isList }" @click.stop.prevent="changeListStyle()"></view>
@@ -118,7 +118,7 @@
<!-- <view class="cart-box" v-if="(value.template == 2 || value.template == 4) && value.quickBuy && storeToken && categoryTree && categoryTree.length"> <!-- <view class="cart-box" v-if="(value.template == 2 || value.template == 4) && value.quickBuy && storeToken && categoryTree && categoryTree.length">
<view class="left-wrap"> <view class="left-wrap">
<view class="cart-icon" ref="cartIcon" :animation="cartAnimation" @click="$util.redirectTo('/pages/goods/cart')"> <view class="cart-icon" ref="cartIcon" :animation="cartAnimation" @click="$util.redirectTo('/pages_goods/cart')">
<text class="iconfont icon-ziyuan1"></text> <text class="iconfont icon-ziyuan1"></text>
<view class="num" v-if="cartNumber">{{ cartNumber < 99 ? cartNumber : '99+' }}</view> <view class="num" v-if="cartNumber">{{ cartNumber < 99 ? cartNumber : '99+' }}</view>
</view> </view>
@@ -446,7 +446,7 @@
cart_ids: this.cartIds.toString() cart_ids: this.cartIds.toString()
}, },
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_order/payment');
this.isSub = false; this.isSub = false;
} }
}); });
@@ -528,6 +528,9 @@
changeListStyle() { changeListStyle() {
this.isList = !this.isList; this.isList = !this.isList;
}, },
onClickSearch() {
this.$util.redirectTo('/pages_tool/goods/search');
}
} }
}; };
</script> </script>

View File

@@ -436,11 +436,11 @@
//去使用 //去使用
toGoodsList(item) { toGoodsList(item) {
if (item.goods_type != 1) { if (item.goods_type != 1) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
coupon: item.coupon_type_id coupon: item.coupon_type_id
}); });
} else { } else {
this.$util.redirectTo('/pages/goods/list', {}); this.$util.redirectTo('/pages_goods/list', {});
} }
} }
}, },

View File

@@ -118,7 +118,7 @@ export default {
methods: { methods: {
//页面跳转 //页面跳转
toDetail(e) { toDetail(e) {
this.$util.redirectTo('/pages/goods/detail', { goods_id: e.goods_id }); this.$util.redirectTo('/pages_goods/detail', { goods_id: e.goods_id });
}, },
//关注 //关注
followGoods(e, index) { followGoods(e, index) {

View File

@@ -110,7 +110,7 @@
}); });
}, },
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
brand_id: item.brand_id brand_id: item.brand_id
}); });
}, },

View File

@@ -414,7 +414,7 @@
}); });
}, },
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },

View File

@@ -198,7 +198,7 @@
}); });
}, },
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },

View File

@@ -336,7 +336,7 @@
}, },
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },
@@ -375,7 +375,7 @@
}); });
}, },
toCateGoodsList(e, f) { toCateGoodsList(e, f) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
category_id: e, category_id: e,
category_level: f category_level: f
}); });

View File

@@ -2,7 +2,7 @@
<view data-component-name="diy-member-my-order" class="common-wrap" :style="warpCss"> <view data-component-name="diy-member-my-order" class="common-wrap" :style="warpCss">
<view class="order-wrap"> <view class="order-wrap">
<view class="status-wrap"> <view class="status-wrap">
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitpay')" style="margin-right: 10rpx;"> <view class="item-wrap" @click="redirect('/pages_order/list?status=waitpay')" style="margin-right: 10rpx;">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_pay.png')" mode="widthFix"/> <image :src="$util.img('public/uniapp/member/order/wait_pay.png')" mode="widthFix"/>
@@ -15,7 +15,7 @@
</view> </view>
<view class="title">{{ $lang('waitpay') }}</view> <view class="title">{{ $lang('waitpay') }}</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitsend')" style="margin-right: 10rpx;"> <view class="item-wrap" @click="redirect('/pages_order/list?status=waitsend')" style="margin-right: 10rpx;">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_send.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/order/wait_send.png')" mode="widthFix"></image>
@@ -28,7 +28,7 @@
</view> </view>
<view class="title">{{ $lang('waitsend') }}</view> <view class="title">{{ $lang('waitsend') }}</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitconfirm')" style="margin-right: 10rpx;"> <view class="item-wrap" @click="redirect('/pages_order/list?status=waitconfirm')" style="margin-right: 10rpx;">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_confirm.png')" mode="widthFix"/> <image :src="$util.img('public/uniapp/member/order/wait_confirm.png')" mode="widthFix"/>
@@ -41,7 +41,7 @@
</view> </view>
<view class="title">{{ $lang('waitconfirm') }}</view> <view class="title">{{ $lang('waitconfirm') }}</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitrate')" style="margin-right: 10rpx;"> <view class="item-wrap" @click="redirect('/pages_order/list?status=waitrate')" style="margin-right: 10rpx;">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_use.png')" mode="widthFix"/> <image :src="$util.img('public/uniapp/member/order/wait_use.png')" mode="widthFix"/>

View File

@@ -72,7 +72,7 @@ export default {
uni.getStorage({ uni.getStorage({
key: 'shopInfo', key: 'shopInfo',
success: (e) => { success: (e) => {
// console.log(`获取到的shopInfo:${JSON.stringify(e.data)}`) console.log(`获取到的shopInfo:${JSON.stringify(e.data)}`)
this.shopInfo = e.data; this.shopInfo = e.data;
// 从店铺信息中获取手机号 // 从店铺信息中获取手机号

View File

@@ -2,7 +2,7 @@
<!-- 当前商品参与的营销活动入口 --> <!-- 当前商品参与的营销活动入口 -->
<view class="ns-goods-promotion" v-if="goodsPromotion.length"> <view class="ns-goods-promotion" v-if="goodsPromotion.length">
<view v-for="(item, index) in goodsPromotion" v-if="promotion != item.promotion_type" :key="index"> <view v-for="(item, index) in goodsPromotion" v-if="promotion != item.promotion_type" :key="index">
<view v-if="item.promotion_type == 'discount'" class="item" @click="redirectTo('/pages/goods/detail', { goods_id: item.goods_id })"> <view v-if="item.promotion_type == 'discount'" class="item" @click="redirectTo('/pages_goods/detail', { goods_id: item.goods_id })">
<text class="promotion-mark ">限时折扣</text> <text class="promotion-mark ">限时折扣</text>
<text class="title">当前商品正在参加{{ item.promotion_name }}</text> <text class="title">当前商品正在参加{{ item.promotion_name }}</text>
<text class="iconfont icon-right"></text> <text class="iconfont icon-right"></text>

View File

@@ -87,7 +87,7 @@
let data = { let data = {
goods_id: e.goods_id goods_id: e.goods_id
}; };
this.$util.redirectTo('/pages/goods/detail', data); this.$util.redirectTo('/pages_goods/detail', data);
}, },
getLikeList(size) { getLikeList(size) {
let that = this; let that = this;

View File

@@ -34,7 +34,7 @@
return; return;
} }
if (config == "detail" || data.is_virtual) { if (config == "detail" || data.is_virtual) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: data.goods_id goods_id: data.goods_id
}); });
return false; return false;

View File

@@ -1109,7 +1109,7 @@
key: 'orderCreateData', key: 'orderCreateData',
data: data, data: data,
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_order/payment');
this.btnSwitch = false; this.btnSwitch = false;
} }
}); });

View File

@@ -1,5 +1,6 @@
{ {
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages "pages": [
// pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@@ -7,7 +8,6 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/contact/contact", "path": "pages/contact/contact",
"style": { "style": {
@@ -15,15 +15,6 @@
} }
}, },
//******************商品模块11****************** //******************商品模块11******************
{
"path": "pages/goods/cart",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "购物车"
}
},
{ {
"path": "pages/goods/category", "path": "pages/goods/category",
"style": { "style": {
@@ -32,93 +23,110 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
// 商品详情
{
"path": "pages/goods/detail",
"style": {
"navigationBarTitleText": "商品详情"
}
},
{
"path": "pages/goods/list",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "商品列表"
}
},
//******************会员模块20****************** //******************会员模块20******************
{ {
"path": "pages/member/index", "path": "pages/member/index",
"style": { "style": {
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
//******************订单模块12******************
{
"path": "pages/order/payment",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/order/list",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/order/detail",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/order/detail_local_delivery",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/order/detail_pickup",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
//积分订单详情
{
"path": "pages/order/detail_point",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
} }
], ],
"subPackages": [{ "subPackages": [
{
//******************商品模块分包******************
"root": "pages_goods",
"pages": [
{
"path": "cart",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "购物车"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "商品详情"
}
},
{
"path": "list",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "商品列表"
}
}
]
},
{
//******************订单模块分包******************
"root": "pages_order",
"pages": [
{
"path": "payment",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "list",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "detail",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "detail_local_delivery",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{
"path": "detail_pickup",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
//积分订单详情
{
"path": "detail_point",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
}
]
},
{
//******************营销活动模块26****************** //******************营销活动模块26******************
"root": "pages_promotion", "root": "pages_promotion",
"pages": [ "pages": [
//----------积分模块2---------- //----------积分模块2----------
{ {
"path": "point/list", "path": "point/list",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, { },
{
"path": "point/goods_list", "path": "point/goods_list",
"style": { "style": {
// #ifdef APP-PLUS // #ifdef APP-PLUS
@@ -156,7 +164,6 @@
// #endif // #endif
} }
}, },
//****************** 商户 ****************** //****************** 商户 ******************
{ {
"path": "merch/merchcategory", "path": "merch/merchcategory",
@@ -337,7 +344,7 @@
"path": "index/diy", "path": "index/diy",
"style": { "style": {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// "navigationStyle": "custom", // "navigationStyle": "custom",
// #endif // #endif
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
@@ -581,7 +588,6 @@
// #endif // #endif
} }
}, },
//******************商品模块****************** //******************商品模块******************
{ {
"path": "goods/coupon", "path": "goods/coupon",
@@ -631,8 +637,6 @@
// #endif // #endif
} }
}, },
//******************CMS模块6****************** //******************CMS模块6******************
{ {
"path": "help/list", "path": "help/list",
@@ -869,7 +873,7 @@
// #endif // #endif
"navigationBarTitleText": "介质材料搜索" "navigationBarTitleText": "介质材料搜索"
} }
}, },
{ {
"path": "seal/medium/detail", "path": "seal/medium/detail",
"style": { "style": {
@@ -918,7 +922,8 @@
"selectedColor": "#FF0036", "selectedColor": "#FF0036",
"backgroundColor": "#fff", "backgroundColor": "#fff",
"borderStyle": "white", "borderStyle": "white",
"list": [{ "list": [
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "" "text": ""
}, },
@@ -942,7 +947,9 @@
"preloadRule": { "preloadRule": {
"pages/index/index": { "pages/index/index": {
"network": "all", "network": "all",
"packages": ["pages_tool"] "packages": [
"pages_tool"
]
} }
} }
} }

View File

@@ -140,7 +140,7 @@
<view class="card-content" :style="{ height: [cardOff ? 'auto' : '198rpx'] }"> <view class="card-content" :style="{ height: [cardOff ? 'auto' : '198rpx'] }">
<view class="card-item" <view class="card-item"
v-for="(item, index) in goodsSkuDetail.card_info.relation_goods" v-for="(item, index) in goodsSkuDetail.card_info.relation_goods"
@click="$util.redirectTo('/pages/goods/detail', { goods_id: item.goods_id })" @click="$util.redirectTo('/pages_goods/detail', { goods_id: item.goods_id })"
> >
<image :src="$util.img(item.sku_image)" mode="aspectFill"/> <image :src="$util.img(item.sku_image)" mode="aspectFill"/>
<view class="content"> <view class="content">

View File

@@ -367,7 +367,7 @@ export default {
cart_ids: cart_ids.toString() cart_ids: cart_ids.toString()
}, },
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_order/payment');
this.isSub = false; this.isSub = false;
} }
}); });
@@ -413,7 +413,7 @@ export default {
this.$forceUpdate(); this.$forceUpdate();
}, },
toGoodsDetail(item) { toGoodsDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
sku_id: item.sku_id sku_id: item.sku_id
}); });
}, },

View File

@@ -1,7 +1,7 @@
export default { export default {
data() { data() {
return { return {
goodsRoute: '/pages/goods/detail', goodsRoute: '/pages_goods/detail',
couponList: [], //优惠券列表 couponList: [], //优惠券列表
couponBtnSwitch: false, //获取优惠券防止重复提交 couponBtnSwitch: false, //获取优惠券防止重复提交

View File

@@ -305,7 +305,7 @@ export default {
}, },
//商品详情 //商品详情
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },

View File

@@ -654,13 +654,13 @@
this.getOrderData(); this.getOrderData();
} else { } else {
this.$util.redirectTo('/pages_tool/login/login', { this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages/order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
}); });
} }
}, },
methods: { methods: {
goDetail(e) { goDetail(e) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: e.goods_id goods_id: e.goods_id
}); });
}, },
@@ -721,7 +721,7 @@
title: '未获取到订单信息!' title: '未获取到订单信息!'
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1500); }, 1500);
} }
}, },

View File

@@ -12,7 +12,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
if (option.order_id) { if (option.order_id) {
this.$util.redirectTo('/pages/order/detail', {order_id: option.order_id}, 'redirectTo'); this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
} }
} }
}; };

View File

@@ -12,7 +12,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
if (option.order_id) { if (option.order_id) {
this.$util.redirectTo('/pages/order/detail', {order_id: option.order_id}, 'redirectTo'); this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
} }
} }
}; };

View File

@@ -164,7 +164,7 @@
this.getOrderData(); this.getOrderData();
} else { } else {
this.$util.redirectTo('/pages_tool/login/login', { this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages/order/detail_point?order_id=' + this.orderId back: '/pages_order/detail_point?order_id=' + this.orderId
}); });
} }
}, },
@@ -205,7 +205,7 @@
title: '未获取到订单信息!' title: '未获取到订单信息!'
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1500); }, 1500);
} }
}, },

View File

@@ -3,8 +3,8 @@
<view class="order-container"> <view class="order-container">
<view class="cate-search"> <view class="cate-search">
<view class="search-box"> <view class="search-box">
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()" /> <input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()" @click.stop="search()" @tap.stop="search()" />
<text class="iconfont icon-sousuo3" @click="search()"></text> <text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view> </view>
</view> </view>
<view class="order-nav" v-if="storeToken"> <view class="order-nav" v-if="storeToken">
@@ -192,7 +192,7 @@
if (this.$refs.mescroll) this.$refs.mescroll.refresh(); if (this.$refs.mescroll) this.$refs.mescroll.refresh();
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.login.open('/pages/order/list?status=' + this.orderStatus); this.$refs.login.open('/pages_order/list?status=' + this.orderStatus);
}) })
} }
}, },
@@ -345,13 +345,13 @@
switch (parseInt(data.order_type)) { switch (parseInt(data.order_type)) {
case 2: case 2:
// //
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_order/detail_pickup', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
case 3: case 3:
// //
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_order/detail_local_delivery', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
@@ -362,7 +362,7 @@
}); });
break; break;
default: default:
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;

View File

@@ -253,7 +253,7 @@
}, },
//商品详情 //商品详情
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },

View File

@@ -1,265 +1,265 @@
import { import {
Weixin Weixin
} from '@/common/js/wx-jssdk.js'; } from '@/common/js/wx-jssdk.js';
export default { export default {
data() { data() {
return { return {
categoryList: [], categoryList: [],
goodsList: [], goodsList: [],
categoryId: 0, categoryId: 0,
is_fenxiao: false, is_fenxiao: false,
currIndex: 0, currIndex: 0,
poster: '-1', //海报 poster: '-1', //海报
posterMsg: '', //海报错误信息 posterMsg: '', //海报错误信息
shareUrl: '/pages_promotion/fenxiao/goods_list', shareUrl: '/pages_promotion/fenxiao/goods_list',
shareType: 'goods', shareType: 'goods',
//海报模板id //海报模板id
templateId: ['default'], templateId: ['default'],
} }
}, },
onLoad(options) { onLoad(options) {
setTimeout(() => { setTimeout(() => {
if (!this.addonIsExist.fenxiao) { if (!this.addonIsExist.fenxiao) {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启分销', title: '商家未开启分销',
mask: true, mask: true,
duration: 2000 duration: 2000
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/index/index'); this.$util.redirectTo('/pages/index/index');
}, 2000); }, 2000);
} }
}, 1000); }, 1000);
if (options.templateId) { if (options.templateId) {
this.templateId = options.templateId.split(','); this.templateId = options.templateId.split(',');
} }
this.getGoodsCategoryTree(); this.getGoodsCategoryTree();
}, },
onShow() { onShow() {
if (!this.storeToken) { if (!this.storeToken) {
this.$util.redirectTo( this.$util.redirectTo(
'/pages_tool/login/login', { '/pages_tool/login/login', {
back: '/pages_promotion/fenxiao/goods_list' back: '/pages_promotion/fenxiao/goods_list'
}, },
'redirectTo' 'redirectTo'
); );
return; return;
} }
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心'); if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
this.is_fenxiao = Boolean(this.memberInfo.is_fenxiao); this.is_fenxiao = Boolean(this.memberInfo.is_fenxiao);
}, },
methods: { methods: {
//获取列表 //获取列表
getGoodsList(mescroll) { getGoodsList(mescroll) {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/fenxiao/api/goods/page', url: '/fenxiao/api/goods/page',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size, page_size: mescroll.size,
category_id: this.categoryId category_id: this.categoryId
}, },
success: res => { success: res => {
let newArr = [] let newArr = []
let msg = res.message; let msg = res.message;
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
newArr = res.data.list; newArr = res.data.list;
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: msg title: msg
}) })
} }
mescroll.endSuccess(newArr.length); mescroll.endSuccess(newArr.length);
//设置列表数据 //设置列表数据
if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表 if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
this.goodsList = this.goodsList.concat(newArr); //追加新数据 this.goodsList = this.goodsList.concat(newArr); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
fail: res => { fail: res => {
//联网失败的回调 //联网失败的回调
mescroll.endErr(); mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}); });
}, },
//商品详情 //商品详情
navToDetailPage(item) { navToDetailPage(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },
//查询一级商品分类 //查询一级商品分类
getGoodsCategoryTree() { getGoodsCategoryTree() {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/goodscategory/tree', url: '/api/goodscategory/tree',
data: { data: {
level: 1 level: 1
}, },
success: res => { success: res => {
if (res.code == 0) { if (res.code == 0) {
this.categoryList = res.data; this.categoryList = res.data;
} }
} }
}); });
}, },
changeCategory(category_id) { changeCategory(category_id) {
this.categoryId = category_id; this.categoryId = category_id;
if (this.$refs.mescroll) { if (this.$refs.mescroll) {
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
this.$refs.mescroll.myScrollTo(0); this.$refs.mescroll.myScrollTo(0);
} }
}, },
// 分享商品 // 分享商品
shareFn(type, keys) { shareFn(type, keys) {
this.shareType = type; this.shareType = type;
if (this.shareType == "fenxiao") if (this.shareType == "fenxiao")
this.openPosterPopup(); this.openPosterPopup();
else { else {
this.currIndex = keys; this.currIndex = keys;
this.$refs.sharePopup.open(); this.$refs.sharePopup.open();
} }
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
/** /**
* 将商品推荐到微信圈子 * 将商品推荐到微信圈子
*/ */
openBusinessView() { openBusinessView() {
if (wx.openBusinessView) { if (wx.openBusinessView) {
wx.openBusinessView({ wx.openBusinessView({
businessType: 'friendGoodsRecommend', businessType: 'friendGoodsRecommend',
extraData: { extraData: {
product: { product: {
item_code: this.goodsList[this.currIndex].goods_id, item_code: this.goodsList[this.currIndex].goods_id,
title: this.goodsList[this.currIndex].sku_name, title: this.goodsList[this.currIndex].sku_name,
image_list: this.$util.img(this.goodsList[this.currIndex].goods_image) image_list: this.$util.img(this.goodsList[this.currIndex].goods_image)
} }
}, },
success: function (res) { success: function (res) {
console.log('success', res); console.log('success', res);
}, },
fail: function (res) { fail: function (res) {
console.log('fail', res); console.log('fail', res);
} }
}) })
} }
}, },
// #endif // #endif
//-------------------------------------海报------------------------------------- //-------------------------------------海报-------------------------------------
// 打开海报弹出层 // 打开海报弹出层
openPosterPopup() { openPosterPopup() {
this.getGoodsPoster(); this.getGoodsPoster();
this.$refs.sharePopup.close(); this.$refs.sharePopup.close();
}, },
// 关闭海报弹出层 // 关闭海报弹出层
closePosterPopup() { closePosterPopup() {
this.$refs.posterPopup.close(); this.$refs.posterPopup.close();
}, },
//生成海报 //生成海报
getGoodsPoster() { getGoodsPoster() {
uni.showLoading({ uni.showLoading({
'title': '海报生成中...' 'title': '海报生成中...'
}); });
let url = ""; let url = "";
let data = {}; let data = {};
if (this.shareType == "goods") { if (this.shareType == "goods") {
url = "/api/goods/poster"; url = "/api/goods/poster";
data.page = "/pages/goods/detail"; data.page = "/pages_goods/detail";
data.qrcode_param = JSON.stringify({ data.qrcode_param = JSON.stringify({
goods_id: this.goodsList[this.currIndex].goods_id, goods_id: this.goodsList[this.currIndex].goods_id,
source_member: this.memberInfo.member_id source_member: this.memberInfo.member_id
}); });
} else { } else {
url = "/fenxiao/api/fenxiao/poster"; url = "/fenxiao/api/fenxiao/poster";
data.page = "/pages/index/index"; data.page = "/pages/index/index";
data.qrcode_param = JSON.stringify({}); data.qrcode_param = JSON.stringify({});
data.template_id = this.templateId[0]; data.template_id = this.templateId[0];
} }
this.$api.sendRequest({ this.$api.sendRequest({
url: url, url: url,
data: data, data: data,
success: res => { success: res => {
if (res.code == 0) { if (res.code == 0) {
this.poster = res.data.path + "?time=" + new Date().getTime(); this.poster = res.data.path + "?time=" + new Date().getTime();
this.$refs.posterPopup.open(); this.$refs.posterPopup.open();
} else { } else {
this.posterMsg = res.message; this.posterMsg = res.message;
} }
uni.hideLoading(); uni.hideLoading();
}, },
fail: err => { fail: err => {
uni.hideLoading(); uni.hideLoading();
} }
}); });
}, },
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
//小程序中保存海报 //小程序中保存海报
saveGoodsPoster() { saveGoodsPoster() {
let url = this.$util.img(this.poster); let url = this.$util.img(this.poster);
uni.downloadFile({ uni.downloadFile({
url: url, url: url,
success: (res) => { success: (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath, filePath: res.tempFilePath,
success: () => { success: () => {
this.$util.showToast({ this.$util.showToast({
title: "保存成功" title: "保存成功"
}); });
}, },
fail: () => { fail: () => {
this.$util.showToast({ this.$util.showToast({
title: "保存失败,请稍后重试" title: "保存失败,请稍后重试"
}); });
} }
}); });
} }
} }
}); });
}, },
// #endif // #endif
// 打开分享弹出层 // 打开分享弹出层
openSharePopup() { openSharePopup() {
this.$refs.sharePopup.open(); this.$refs.sharePopup.open();
}, },
// 关闭分享弹出层 // 关闭分享弹出层
closeSharePopup() { closeSharePopup() {
this.$refs.sharePopup.close(); this.$refs.sharePopup.close();
}, },
copyUrl() { copyUrl() {
let text = this.$config.h5Domain + '/pages/goods/detail?goods_id=' + this.goodsList[this.currIndex].goods_id + '&source_member=' + this.memberInfo.member_id; let text = this.$config.h5Domain + '/pages_goods/detail?goods_id=' + this.goodsList[this.currIndex].goods_id + '&source_member=' + this.memberInfo.member_id;
this.$util.copy(text, () => { this.$util.copy(text, () => {
this.closeSharePopup(); this.closeSharePopup();
}); });
}, },
imageError(index) { imageError(index) {
this.goodsList[index].sku_image = this.$util.getDefaultImage().goods; this.goodsList[index].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate(); this.$forceUpdate();
} }
}, },
/** /**
* 自定义分享内容 * 自定义分享内容
* @param {Object} res * @param {Object} res
*/ */
onShareAppMessage(res) { onShareAppMessage(res) {
var path = this.shareUrl; var path = this.shareUrl;
if (this.shareType == "goods") { if (this.shareType == "goods") {
path = `/pages/goods/detail?goods_id=${this.goodsList[this.currIndex].goods_id}&sku_id=${this.goodsList[this.currIndex].sku_id}&source_member=${this.memberInfo.member_id}`; path = `/pages_goods/detail?goods_id=${this.goodsList[this.currIndex].goods_id}&sku_id=${this.goodsList[this.currIndex].sku_id}&source_member=${this.memberInfo.member_id}`;
} }
return { return {
title: this.goodsList[this.currIndex].sku_name, title: this.goodsList[this.currIndex].sku_name,
imageUrl: this.$util.img(this.goodsList[this.currIndex].goods_image, { imageUrl: this.$util.img(this.goodsList[this.currIndex].goods_image, {
size: 'big' size: 'big'
}), }),
path: path, path: path,
success: res => { success: res => {
}, },
fail: res => { fail: res => {
} }
}; };
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,475 +1,475 @@
export default { export default {
data() { data() {
return { return {
listStyle: '', listStyle: '',
loadingType: 'loading', //加载更多状态 loadingType: 'loading', //加载更多状态
orderType: '', orderType: '',
priceOrder: 'desc', //1 价格从低到高 2价格从高到低 priceOrder: 'desc', //1 价格从低到高 2价格从高到低
categoryList: [], //排序类型 categoryList: [], //排序类型
goodsList: [], goodsList: [],
order: '', order: '',
sort: 'desc', sort: 'desc',
showScreen: false, showScreen: false,
keyword: '', keyword: '',
categoryId: 0, categoryId: 0,
minPrice: '', minPrice: '',
maxPrice: '', maxPrice: '',
isFreeShipping: false, //是否免邮 isFreeShipping: false, //是否免邮
isIphoneX: false, isIphoneX: false,
coupon: 0, coupon: 0,
emptyShow: false, emptyShow: false,
isList: true, //列表样式 isList: true, //列表样式
//分享所需标题 //分享所需标题
share_title: '', share_title: '',
//搜索到多少件商品 //搜索到多少件商品
count: 0, count: 0,
//当前分类名称 //当前分类名称
category_title: '', category_title: '',
//优惠券数据 //优惠券数据
coupon_name: '', coupon_name: '',
//列表瀑布流数据 //列表瀑布流数据
listHeight: [], listHeight: [],
listPosition: [], listPosition: [],
debounce: null, debounce: null,
brandId: 0, brandId: 0,
merch_id:0, merch_id:0,
merch:{}, merch:{},
brandList: [], //品牌筛选项 brandList: [], //品牌筛选项
config: { config: {
fontWeight: false, fontWeight: false,
padding: 0, padding: 0,
cartEvent: "detail", cartEvent: "detail",
text: "购买", text: "购买",
textColor: "#FFFFFF", textColor: "#FFFFFF",
theme: "default", theme: "default",
aroundRadius: 25, aroundRadius: 25,
control: true, control: true,
bgColor: "#FF6A00", bgColor: "#FF6A00",
style: "button", style: "button",
iconDiy: { iconDiy: {
iconType: "icon", iconType: "icon",
icon: "", icon: "",
style: { style: {
fontSize: "60", fontSize: "60",
iconBgColor: [], iconBgColor: [],
iconBgColorDeg: 0, iconBgColorDeg: 0,
iconBgImg: "", iconBgImg: "",
bgRadius: 0, bgRadius: 0,
iconColor: [ iconColor: [
"#000000" "#000000"
], ],
iconColorDeg: 0 iconColorDeg: 0
} }
} }
}, },
} }
}, },
onLoad(options) { onLoad(options) {
this.categoryId = options.category_id || 0; this.categoryId = options.category_id || 0;
this.keyword = options.keyword || ''; this.keyword = options.keyword || '';
this.coupon = options.coupon || 0; this.coupon = options.coupon || 0;
this.goods_id_arr = options.goods_id_arr || 0; this.goods_id_arr = options.goods_id_arr || 0;
this.brandId = options.brand_id || 0; this.brandId = options.brand_id || 0;
this.merch_id = options.merch_id || 0; this.merch_id = options.merch_id || 0;
if(this.merch_id > 0){ if(this.merch_id > 0){
this.getMerch() this.getMerch()
}else{ }else{
uni.showModal({ uni.showModal({
title:'提示', title:'提示',
content:'商家不存在', content:'商家不存在',
showCancel:false, showCancel:false,
success(e){ success(e){
uni.navigateBack({}) uni.navigateBack({})
} }
}) })
} }
this.loadCategoryList(this.categoryId); this.loadCategoryList(this.categoryId);
this.getBrandList(); this.getBrandList();
this.isIphoneX = this.$util.uniappIsIPhoneX(); this.isIphoneX = this.$util.uniappIsIPhoneX();
//小程序分享接收source_member //小程序分享接收source_member
if (options.source_member) { if (options.source_member) {
uni.setStorageSync('source_member', options.source_member); uni.setStorageSync('source_member', options.source_member);
} }
// 小程序扫码进入接收source_member // 小程序扫码进入接收source_member
if (options.scene) { if (options.scene) {
var sceneParams = decodeURIComponent(options.scene); var sceneParams = decodeURIComponent(options.scene);
sceneParams = sceneParams.split('&'); sceneParams = sceneParams.split('&');
if (sceneParams.length) { if (sceneParams.length) {
sceneParams.forEach(item => { sceneParams.forEach(item => {
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1]; if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]); if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1); if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
}); });
} }
} }
uni.onWindowResize(res => { uni.onWindowResize(res => {
if (this.debounce) clearTimeout(this.debounce); if (this.debounce) clearTimeout(this.debounce);
this.waterfallflow(0); this.waterfallflow(0);
}) })
}, },
onShow() { onShow() {
//记录分享关系 //记录分享关系
if (this.storeToken && uni.getStorageSync('source_member')) { if (this.storeToken && uni.getStorageSync('source_member')) {
this.$util.onSourceMember(uni.getStorageSync('source_member')); this.$util.onSourceMember(uni.getStorageSync('source_member'));
} }
}, },
/** /**
* 转发分享 * 转发分享
*/ */
onShareAppMessage(res) { onShareAppMessage(res) {
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品'; var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0); let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var path = route.path; var path = route.path;
return { return {
title: title, title: title,
path: path, path: path,
success: res => { success: res => {
}, },
fail: res => { fail: res => {
} }
}; };
}, },
// 分享到微信朋友圈 // 分享到微信朋友圈
onShareTimeline() { onShareTimeline() {
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品'; var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0); let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var query = route.query; var query = route.query;
return { return {
title: title, title: title,
query: query, query: query,
imageUrl: '' imageUrl: ''
}; };
}, },
methods: { methods: {
getMerch(){ getMerch(){
this.$api.sendRequest({ this.$api.sendRequest({
url: '/merch/api/merch/merchinfo', url: '/merch/api/merch/merchinfo',
data: { data: {
merch_id:this.merch_id merch_id:this.merch_id
}, },
success: res => { success: res => {
console.log(res) console.log(res)
this.merch = res.data this.merch = res.data
} }
}); });
}, },
/** /**
* 获取优惠券数据 * 获取优惠券数据
*/ */
couponInfo(id) { couponInfo(id) {
return new Promise(resolve => { return new Promise(resolve => {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/coupon/api/coupon/typeinfo', url: '/coupon/api/coupon/typeinfo',
data: { data: {
coupon_type_id: id coupon_type_id: id
}, },
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
resolve(res.data.coupon_name); resolve(res.data.coupon_name);
} }
} }
}); });
}) })
}, },
/** /**
* 获取分类名称 * 获取分类名称
*/ */
share_select(data, id) { share_select(data, id) {
return new Promise((resolve) => { return new Promise((resolve) => {
data.forEach((item) => { data.forEach((item) => {
if (item.category_id == id) { if (item.category_id == id) {
resolve(item.category_name) resolve(item.category_name)
} }
if (item.child_list && item.child_list.length > 0) { if (item.child_list && item.child_list.length > 0) {
item.child_list.forEach((v) => { item.child_list.forEach((v) => {
if (v.category_id == id) { if (v.category_id == id) {
resolve(v.category_name) resolve(v.category_name)
} }
if (v.child_list && v.child_list.length > 0) { if (v.child_list && v.child_list.length > 0) {
v.forEach((m) => { v.forEach((m) => {
if (m.category_id == id) { if (m.category_id == id) {
resolve(m.category_name) resolve(m.category_name)
} }
}) })
} }
}) })
} }
}) })
}) })
}, },
//加载分类 //加载分类
loadCategoryList(fid, sid) { loadCategoryList(fid, sid) {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/goodscategory/tree', url: '/api/goodscategory/tree',
data: {}, data: {},
success: res => { success: res => {
if (res.data != null) { if (res.data != null) {
this.categoryList = res.data this.categoryList = res.data
} }
} }
}); });
}, },
getGoodsList(mescroll) { getGoodsList(mescroll) {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/goodssku/page', url: '/api/goodssku/page',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size, page_size: mescroll.size,
keyword: this.keyword, keyword: this.keyword,
category_id: this.categoryId, category_id: this.categoryId,
brand_id: this.brandId, brand_id: this.brandId,
min_price: this.minPrice, min_price: this.minPrice,
max_price: this.maxPrice, max_price: this.maxPrice,
is_free_shipping: (this.isFreeShipping ? 1 : 0), is_free_shipping: (this.isFreeShipping ? 1 : 0),
order: this.order, order: this.order,
sort: this.sort, sort: this.sort,
coupon: this.coupon, coupon: this.coupon,
goods_id_arr: this.goods_id_arr, goods_id_arr: this.goods_id_arr,
merch_id:this.merch_id merch_id:this.merch_id
}, },
success: res => { success: res => {
let newArr = [] let newArr = []
let msg = res.message; let msg = res.message;
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
this.count = res.data.count; this.count = res.data.count;
if (res.data.page_count == 0) { if (res.data.page_count == 0) {
this.emptyShow = true this.emptyShow = true
} }
newArr = res.data.list; newArr = res.data.list;
newArr = newArr.map(item => { newArr = newArr.map(item => {
item.id = this.genNonDuplicate(); item.id = this.genNonDuplicate();
return item; return item;
}); });
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: msg title: msg
}) })
} }
this.category_title = ''; this.category_title = '';
this.coupon_name = ''; this.coupon_name = '';
if (res.data.config) this.config = res.data.config; if (res.data.config) this.config = res.data.config;
if (this.categoryId) { if (this.categoryId) {
this.share_select(this.categoryList, this.categoryId).then(resolve => { this.share_select(this.categoryList, this.categoryId).then(resolve => {
this.category_title = resolve this.category_title = resolve
}); });
} }
if (this.coupon) { if (this.coupon) {
this.couponInfo(this.coupon).then(resolve => { this.couponInfo(this.coupon).then(resolve => {
this.coupon_name = resolve this.coupon_name = resolve
}); });
} }
mescroll.endSuccess(newArr.length); mescroll.endSuccess(newArr.length);
//设置列表数据 //设置列表数据
if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表 if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
this.goodsList = this.goodsList.concat(newArr); //追加新数据 this.goodsList = this.goodsList.concat(newArr); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.waterfallflow((mescroll.num - 1) * 10); this.waterfallflow((mescroll.num - 1) * 10);
}, },
fail: res => { fail: res => {
//联网失败的回调 //联网失败的回调
mescroll.endErr(); mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}); });
}, },
changeListStyle() { changeListStyle() {
this.isList = !this.isList; this.isList = !this.isList;
this.waterfallflow(0); this.waterfallflow(0);
}, },
//筛选点击 //筛选点击
sortTabClick(tag) { sortTabClick(tag) {
if (tag == 'sale_num') { if (tag == 'sale_num') {
this.order = 'sale_num'; this.order = 'sale_num';
this.sort = 'desc'; this.sort = 'desc';
} else if (tag == 'discount_price') { } else if (tag == 'discount_price') {
this.order = 'discount_price'; this.order = 'discount_price';
this.sort = 'desc'; this.sort = 'desc';
} else if (tag == 'screen') { } else if (tag == 'screen') {
//筛选 //筛选
this.showScreen = true; this.showScreen = true;
return; return;
} else { } else {
this.order = ''; this.order = '';
this.sort = ''; this.sort = '';
} }
if (this.orderType === tag && tag !== 'discount_price') return; if (this.orderType === tag && tag !== 'discount_price') return;
this.orderType = tag; this.orderType = tag;
if (tag === 'discount_price') { if (tag === 'discount_price') {
this.priceOrder = this.priceOrder === 'asc' ? 'desc' : 'asc'; this.priceOrder = this.priceOrder === 'asc' ? 'desc' : 'asc';
this.sort = this.priceOrder; this.sort = this.priceOrder;
} else { } else {
this.priceOrder = ''; this.priceOrder = '';
} }
this.emptyShow = false; this.emptyShow = false;
this.goodsList = []; this.goodsList = [];
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
}, },
//商品详情 //商品详情
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: item.goods_id goods_id: item.goods_id
}); });
}, },
search() { search() {
this.emptyShow = false; this.emptyShow = false;
this.goodsList = []; this.goodsList = [];
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
}, },
selectedCategory(categoryId) { selectedCategory(categoryId) {
this.categoryId = categoryId; this.categoryId = categoryId;
}, },
screenData() { screenData() {
if (this.minPrice != '' || this.maxPrice != '') { if (this.minPrice != '' || this.maxPrice != '') {
// if (!Number(this.minPrice) && this.minPrice) { // if (!Number(this.minPrice) && this.minPrice) {
// this.$util.showToast({ // this.$util.showToast({
// title: '请输入最低价' // title: '请输入最低价'
// }); // });
// return; // return;
// } // }
if (!Number(this.maxPrice) && this.maxPrice) { if (!Number(this.maxPrice) && this.maxPrice) {
this.$util.showToast({ this.$util.showToast({
title: '请输入最高价' title: '请输入最高价'
}); });
return; return;
} }
if (Number(this.minPrice) < 0 || Number(this.maxPrice) < 0) { if (Number(this.minPrice) < 0 || Number(this.maxPrice) < 0) {
this.$util.showToast({ this.$util.showToast({
title: '筛选价格不能小于0' title: '筛选价格不能小于0'
}); });
return; return;
} }
if (this.minPrice != '' && Number(this.minPrice) > Number(this.maxPrice) && this.maxPrice) { if (this.minPrice != '' && Number(this.minPrice) > Number(this.maxPrice) && this.maxPrice) {
this.$util.showToast({ this.$util.showToast({
title: '最低价不能大于最高价' title: '最低价不能大于最高价'
}); });
return; return;
} }
if (this.maxPrice != '' && Number(this.maxPrice) < Number(this.minPrice)) { if (this.maxPrice != '' && Number(this.maxPrice) < Number(this.minPrice)) {
this.$util.showToast({ this.$util.showToast({
title: '最高价不能小于最低价' title: '最高价不能小于最低价'
}); });
return; return;
} }
} }
this.emptyShow = false; this.emptyShow = false;
this.goodsList = []; this.goodsList = [];
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
this.showScreen = false; this.showScreen = false;
}, },
//重置数据 //重置数据
resetData() { resetData() {
this.categoryId = 0 this.categoryId = 0
this.minPrice = '' this.minPrice = ''
this.maxPrice = '' this.maxPrice = ''
this.isFreeShipping = false this.isFreeShipping = false
}, },
goodsImg(imgStr) { goodsImg(imgStr) {
let imgs = imgStr.split(','); let imgs = imgStr.split(',');
return imgs[0] ? this.$util.img(imgs[0], { return imgs[0] ? this.$util.img(imgs[0], {
size: 'mid' size: 'mid'
}) : this.$util.getDefaultImage().goods; }) : this.$util.getDefaultImage().goods;
}, },
imgError(index) { imgError(index) {
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods; this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
}, },
showPrice(data) { showPrice(data) {
let price = data.discount_price; let price = data.discount_price;
if (data.member_price && parseFloat(data.member_price) < parseFloat(price)) price = data.member_price; if (data.member_price && parseFloat(data.member_price) < parseFloat(price)) price = data.member_price;
return price; return price;
}, },
showMarketPrice(item) { showMarketPrice(item) {
if (item.market_price_show) { if (item.market_price_show) {
let price = this.showPrice(item); let price = this.showPrice(item);
if (item.market_price > 0) { if (item.market_price > 0) {
return item.market_price; return item.market_price;
} else if (parseFloat(item.price) > parseFloat(price)) { } else if (parseFloat(item.price) > parseFloat(price)) {
return item.price; return item.price;
} }
} }
return ''; return '';
}, },
goodsTag(data) { goodsTag(data) {
return data.label_name || ''; return data.label_name || '';
}, },
/** /**
* 瀑布流 * 瀑布流
*/ */
waterfallflow(start = 0) { waterfallflow(start = 0) {
if (!this.isList) { if (!this.isList) {
//页面渲染完成后的事件 //页面渲染完成后的事件
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {
let listHeight = []; let listHeight = [];
let listPosition = []; let listPosition = [];
if (start != 0) { if (start != 0) {
listHeight = this.listHeight; listHeight = this.listHeight;
listPosition = this.listPosition; listPosition = this.listPosition;
} }
let column = 2; let column = 2;
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.selectAll('.double-column .goods-item').boundingClientRect(data => { query.selectAll('.double-column .goods-item').boundingClientRect(data => {
for (let i = start; i < data.length; i++) { for (let i = start; i < data.length; i++) {
if (i < column) { if (i < column) {
let position = {}; let position = {};
position.top = uni.upx2px(20) + 'px'; position.top = uni.upx2px(20) + 'px';
if (i % column == 0) { if (i % column == 0) {
position.left = data[i].width * i + "px"; position.left = data[i].width * i + "px";
} else { } else {
position.left = data[i].width * i + (i % column * uni position.left = data[i].width * i + (i % column * uni
.upx2px(30)) + "px"; .upx2px(30)) + "px";
} }
listPosition[i] = position; listPosition[i] = position;
listHeight[i] = data[i].height + uni.upx2px(20); listHeight[i] = data[i].height + uni.upx2px(20);
} else { } else {
let minHeight = Math.min(...listHeight); // 找到第一列的最小高度 let minHeight = Math.min(...listHeight); // 找到第一列的最小高度
let minIndex = listHeight.findIndex(item => item === minHeight) // 找到最小高度的索引 let minIndex = listHeight.findIndex(item => item === minHeight) // 找到最小高度的索引
//设置当前子元素项的位置 //设置当前子元素项的位置
let position = {}; let position = {};
position.top = minHeight + uni.upx2px(20) + "px"; position.top = minHeight + uni.upx2px(20) + "px";
position.left = listPosition[minIndex].left; position.left = listPosition[minIndex].left;
listPosition[i] = position; listPosition[i] = position;
//重新定义数组最小项的高度 进行累加 //重新定义数组最小项的高度 进行累加
listHeight[minIndex] += data[i].height + uni.upx2px(20); listHeight[minIndex] += data[i].height + uni.upx2px(20);
} }
} }
this.listHeight = listHeight; this.listHeight = listHeight;
this.listPosition = listPosition; this.listPosition = listPosition;
}).exec(); }).exec();
}, 50) }, 50)
}) })
} }
}, },
getBrandList() { getBrandList() {
var data = { var data = {
page: 1, page: 1,
page_size: 0 page_size: 0
}; };
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/goodsbrand/page', url: '/api/goodsbrand/page',
data: data, data: data,
success: res => { success: res => {
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
let data = res.data; let data = res.data;
this.brandList = data.list; this.brandList = data.list;
} }
} }
}); });
}, },
/** /**
* 添加购物车回调 * 添加购物车回调
*/ */
addCart(id) { addCart(id) {
}, },
genNonDuplicate(len = 6) { genNonDuplicate(len = 6) {
return Number(Math.random().toString().substr(3, len) + Date.now()).toString(36); return Number(Math.random().toString().substr(3, len) + Date.now()).toString(36);
} }
} }
} }

View File

@@ -4,9 +4,9 @@
<view class="head-wrap"> <view class="head-wrap">
<!-- 搜索区域 --> <!-- 搜索区域 -->
<view class="search-wrap uni-flex uni-row"> <view class="search-wrap uni-flex uni-row">
<view class="flex-item input-wrap"> <view class="flex-item input-wrap" @click.stop="search()" @tap.stop="search()">
<input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()" placeholder="请输入商品关键词" /> <input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()" @click.stop="search()" @tap.stop="search()" placeholder="请输入商品关键词" />
<text class="iconfont icon-sousuo3" @click.stop="search()"></text> <text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view> </view>
</view> </view>

View File

@@ -206,17 +206,17 @@
if (item.type == 1 && item.relate_order_id) { if (item.type == 1 && item.relate_order_id) {
switch (item.delivery_type) { switch (item.delivery_type) {
case 'store': case 'store':
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_order/detail_pickup', {
order_id: item.relate_order_id order_id: item.relate_order_id
}); });
break; break;
case 'local': case 'local':
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_order/detail_local_delivery', {
order_id: item.relate_order_id order_id: item.relate_order_id
}); });
break; break;
case 'express': case 'express':
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: item.relate_order_id order_id: item.relate_order_id
}); });
break; break;
@@ -226,7 +226,7 @@
}); });
} }
} else { } else {
this.$util.redirectTo('/pages/order/detail_point', { this.$util.redirectTo('/pages_order/detail_point', {
order_id: item.order_id order_id: item.order_id
}); });
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,142 +1,142 @@
<template> <template>
<view class="goods"> <view class="goods">
<view class="goods-msg"> <view class="goods-msg">
<image :src="$util.img(goodsInfo.sku_image)" mode="aspectFill"></image> <image :src="$util.img(goodsInfo.sku_image)" mode="aspectFill"></image>
<view class="goods-item"> <view class="goods-item">
<view class="title">{{ goodsInfo.goods_name }}</view> <view class="title">{{ goodsInfo.goods_name }}</view>
<view class="goods-sku"> <view class="goods-sku">
库存:{{ goodsInfo.stock }} 库存:{{ goodsInfo.stock }}
<text>销量:{{ goodsInfo.sale_num }}</text> <text>销量:{{ goodsInfo.sale_num }}</text>
</view> </view>
<view class="goods-price"> <view class="goods-price">
<view class="price color-base-text"> <view class="price color-base-text">
<text class="price-util"></text> <text class="price-util"></text>
<text class="price-num">{{ goodsInfo.price }}</text> <text class="price-num">{{ goodsInfo.price }}</text>
</view> </view>
<view class="see-shop color-base-text" @click="go_shop()"> <view class="see-shop color-base-text" @click="go_shop()">
查看商品 查看商品
<text class="iconfont icon-right"></text> <text class="iconfont icon-right"></text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: 'ns-chat-receiveGoods', name: 'ns-chat-receiveGoods',
props: { props: {
skuId: { skuId: {
type: [Number, String] type: [Number, String]
} }
}, },
data() { data() {
return { return {
goodsInfo: {} goodsInfo: {}
}; };
}, },
mounted() { mounted() {
this.getInfo(); this.getInfo();
}, },
methods: { methods: {
getInfo() { getInfo() {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/goodssku/detail', url: '/api/goodssku/detail',
data: { data: {
sku_id: this.skuId sku_id: this.skuId
}, },
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
this.goodsInfo = res.data.goods_sku_detail; this.goodsInfo = res.data.goods_sku_detail;
this.$emit('upDOM'); this.$emit('upDOM');
// that.setPageScrollTo(); // that.setPageScrollTo();
} }
} }
}); });
}, },
go_shop() { go_shop() {
this.$util.redirectTo('/pages/goods/detail?goods_id=' + this.goodsInfo.goods_id); this.$util.redirectTo('/pages_goods/detail?goods_id=' + this.goodsInfo.goods_id);
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.goods { .goods {
padding: 13rpx 20rpx; padding: 13rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
width: 100vw; width: 100vw;
position: relative; position: relative;
.goods-msg { .goods-msg {
width: 100%; width: 100%;
height: 220rpx; height: 220rpx;
background: #ffffff; background: #ffffff;
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
border-radius: 20rpx; border-radius: 20rpx;
margin: 0 auto; margin: 0 auto;
padding: $padding; padding: $padding;
box-sizing: border-box; box-sizing: border-box;
image { image {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
min-width: 180rpx; min-width: 180rpx;
border-radius: $border-radius; border-radius: $border-radius;
} }
.goods-item { .goods-item {
width: 100%; width: 100%;
height: 180rpx; height: 180rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding-left: 20rpx; padding-left: 20rpx;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
width: 100%; width: 100%;
line-height: 1.4; line-height: 1.4;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
.goods-sku { .goods-sku {
color: $color-sub; color: $color-sub;
text { text {
padding-left: $padding; padding-left: $padding;
} }
} }
.goods-price { .goods-price {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.price { .price {
.price-util { .price-util {
font-size: $font-size-activity-tag; font-size: $font-size-activity-tag;
} }
} }
.see-shop { .see-shop {
display: flex; display: flex;
align-items: center; align-items: center;
text { text {
padding-top: 4rpx; padding-top: 4rpx;
padding-left: 4rpx; padding-left: 4rpx;
font-size: $font-size-sub; font-size: $font-size-sub;
} }
} }
} }
} }
} }
} }
</style> </style>

View File

@@ -45,7 +45,7 @@
onShow() {}, onShow() {},
methods: { methods: {
change(e) { change(e) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
brand_id: this.brandList[e.detail.index].brand_id brand_id: this.brandList[e.detail.index].brand_id
}); });
}, },

View File

@@ -240,11 +240,11 @@
}, },
toGoodsList(item) { toGoodsList(item) {
if (item.goods_type != 1) { if (item.goods_type != 1) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
coupon: item.coupon_type_id coupon: item.coupon_type_id
}); });
} else { } else {
this.$util.redirectTo('/pages/goods/list', {}); this.$util.redirectTo('/pages_goods/list', {});
} }
} }
} }

View File

@@ -3,8 +3,8 @@
<view> <view>
<view class="content"> <view class="content">
<view class="cate-search"> <view class="cate-search">
<view class="search-box"> <view class="search-box" @click="search()" @tap.stop="search()">
<input class="uni-input" maxlength="50" v-model="inputValue" confirm-type="search" @focus="inputFocus" focus @confirm="search()" :placeholder="searchWords ? searchWords : ''" /> <input class="uni-input" maxlength="50" v-model="inputValue" confirm-type="search" @focus="inputFocus" focus @confirm="search()" @click="search()" @tap="search()" :placeholder="searchWords ? searchWords : ''" />
<text class="iconfont icon-sousuo3" @click="search()"></text> <text class="iconfont icon-sousuo3" @click="search()"></text>
</view> </view>
</view> </view>
@@ -153,7 +153,7 @@
} }
uni.setStorageSync('search', array); uni.setStorageSync('search', array);
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
keyword: this.inputValue.trim() keyword: this.inputValue.trim()
}); });
} else { } else {
@@ -162,7 +162,7 @@
title: '搜索内容不能为空哦' title: '搜索内容不能为空哦'
}); });
} else { } else {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
//keyword: this.searchWords //keyword: this.searchWords
}); });
} }

View File

@@ -189,11 +189,11 @@
}, },
toFromDetail(item) { toFromDetail(item) {
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) { if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: item.type_tag order_id: item.type_tag
}); });
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) { } else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: item.type_tag order_id: item.type_tag
}); });
} }

View File

@@ -169,7 +169,7 @@
}, },
toGoodsList(item) { toGoodsList(item) {
if (item.state == 1) { if (item.state == 1) {
this.$util.redirectTo('/pages/goods/list', { this.$util.redirectTo('/pages_goods/list', {
coupon: item.coupon_type_id coupon: item.coupon_type_id
}); });
} }

View File

@@ -229,7 +229,7 @@ export default {
dateList = []; dateList = [];
}, },
toDetail(e) { toDetail(e) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: e.goods_id goods_id: e.goods_id
}); });
} }

View File

@@ -150,22 +150,22 @@ export default {
if (data.type == 1 && data.relate_order_id) { if (data.type == 1 && data.relate_order_id) {
switch (data.delivery_type) { switch (data.delivery_type) {
case 'store': case 'store':
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_order/detail_pickup', {
order_id: data.relate_order_id order_id: data.relate_order_id
}); });
break; break;
case 'local': case 'local':
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_order/detail_local_delivery', {
order_id: data.relate_order_id order_id: data.relate_order_id
}); });
break; break;
default: default:
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: data.relate_order_id order_id: data.relate_order_id
}); });
} }
} else { } else {
this.$util.redirectTo('/pages/order/detail_point', { this.$util.redirectTo('/pages_order/detail_point', {
order_id: data.order_id order_id: data.order_id
}); });
} }
@@ -173,19 +173,19 @@ export default {
} }
}); });
} else if (item.from_type == 'pointcash') { } else if (item.from_type == 'pointcash') {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: item.type_tag order_id: item.type_tag
}); });
} else if (item.from_type == 'memberconsume') { } else if (item.from_type == 'memberconsume') {
// this.$util.redirectTo('/pages/order/detail', { // this.$util.redirectTo('/pages_order/detail', {
// order_id: item.type_tag // order_id: item.type_tag
// }); // });
} else if (item.from_type == 'pointexchangerefund' && parseInt(item.type_tag) != 0) { } else if (item.from_type == 'pointexchangerefund' && parseInt(item.type_tag) != 0) {
this.$util.redirectTo('/pages/order/detail_point', { this.$util.redirectTo('/pages_order/detail_point', {
order_id: item.type_tag order_id: item.type_tag
}); });
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) { } else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: item.type_tag order_id: item.type_tag
}); });
} }

View File

@@ -8,7 +8,7 @@ export default {
methods: { methods: {
//跳转至详情页 //跳转至详情页
toDetail(e) { toDetail(e) {
this.$util.redirectTo("/pages/goods/detail", { this.$util.redirectTo("/pages_goods/detail", {
goods_id: e.goods_id goods_id: e.goods_id
}); });
}, },

View File

@@ -13,7 +13,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
if (option.order_id) { if (option.order_id) {
this.$util.redirectTo('/pages/order/detail', {order_id: option.order_id}, 'redirectTo'); this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
} }
} }
}; };

View File

@@ -128,7 +128,7 @@ export default {
title: '未获取到订单信息!' title: '未获取到订单信息!'
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1500); }, 1500);
} }
}, },
@@ -138,7 +138,7 @@ export default {
}); });
}, },
toGoodsDetail(e) { toGoodsDetail(e) {
this.$util.redirectTo('/pages/goods/detail', { sku_id: e }); this.$util.redirectTo('/pages_goods/detail', { sku_id: e });
}, },
imageError(packageIndex, goodsIndex) { imageError(packageIndex, goodsIndex) {
this.packageList[packageIndex].goods_list[goodsIndex].sku_image = this.$util.getDefaultImage().goods; this.packageList[packageIndex].goods_list[goodsIndex].sku_image = this.$util.getDefaultImage().goods;

View File

@@ -23,7 +23,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
//接收订单号,订单是否是追评等信息 //接收订单号,订单是否是追评等信息
options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages/order/list'); options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages_order/list');
this.isIphoneX = this.$util.uniappIsIPhoneX(); this.isIphoneX = this.$util.uniappIsIPhoneX();
if (!this.storeToken) { if (!this.storeToken) {
@@ -90,7 +90,7 @@ export default {
title: "未获取到订单数据" title: "未获取到订单数据"
}) })
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list', {}, "redirectTo"); this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
}, 1000) }, 1000)
} }
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
@@ -200,7 +200,7 @@ export default {
title: "评价成功" title: "评价成功"
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list', {}, "redirectTo"); this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
}, 1000); }, 1000);
} else { } else {
this.$util.showToast({ this.$util.showToast({

View File

@@ -179,7 +179,7 @@ export default {
} else { } else {
this.$util.showToast({ title: '未获取到该订单项退款信息' }); this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1000); }, 1000);
} }
}, },

View File

@@ -171,7 +171,7 @@ export default {
} else { } else {
this.$util.showToast({ title: '未获取到该订单项退款信息' }); this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1000); }, 1000);
} }
}, },

View File

@@ -197,7 +197,7 @@ export default {
} else { } else {
this.$util.showToast({ title: '未获取到该订单项退款信息' }); this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1000); }, 1000);
} }
}, },
@@ -213,7 +213,7 @@ export default {
if (res.code >= 0) { if (res.code >= 0) {
this.$util.showToast({ title: '撤销成功' }); this.$util.showToast({ title: '撤销成功' });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1000); }, 1000);
} }
}); });
@@ -264,7 +264,7 @@ export default {
this.$forceUpdate(); this.$forceUpdate();
}, },
refundDetail(e) { refundDetail(e) {
this.$util.redirectTo('/pages/goods/detail', { this.$util.redirectTo('/pages_goods/detail', {
goods_id: e.goods_id goods_id: e.goods_id
}); });
} }

View File

@@ -55,7 +55,7 @@
icon:'none' icon:'none'
}) })
setTimeout(()=>{ setTimeout(()=>{
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
},1000) },1000)
} }
}, },

View File

@@ -83,7 +83,7 @@
title: '未获取到该订单项退款信息' title: '未获取到该订单项退款信息'
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/order/list'); this.$util.redirectTo('/pages_order/list');
}, 1000); }, 1000);
} }
}, },

View File

@@ -148,11 +148,11 @@
}, },
toOrderDetail(id) { toOrderDetail(id) {
if (this.payInfo.order_type == 2) { if (this.payInfo.order_type == 2) {
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_order/detail_pickup', {
order_id: id order_id: id
}, 'redirectTo'); }, 'redirectTo');
} else if (this.payInfo.order_type == 3) { } else if (this.payInfo.order_type == 3) {
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_order/detail_local_delivery', {
order_id: id order_id: id
}, 'redirectTo'); }, 'redirectTo');
} else if (this.payInfo.order_type == 4) { } else if (this.payInfo.order_type == 4) {
@@ -160,7 +160,7 @@
order_id: id order_id: id
}, 'redirectTo'); }, 'redirectTo');
} else { } else {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_order/detail', {
order_id: id order_id: id
}, 'redirectTo'); }, 'redirectTo');
} }

View File

@@ -80,7 +80,7 @@ const store = new Vuex.Store({
}, },
copyright: null, copyright: null,
initStatus:false, initStatus:false,
offlineWhiteList:['pages/order/payment','pages/order/list','pages/order/detail'],//线下支付白名单 offlineWhiteList:['pages_order/payment','pages_order/list','pages_order/detail'],//线下支付白名单
canReceiveRegistergiftInfo: { canReceiveRegistergiftInfo: {
status: false, status: false,
path: '' path: ''