chore:在线留言提交后,再次打开在线留言,输入框里没有上次留言内容,查看我的关注,暂无关注的商品,应展示去逛逛按钮,点击售后,跳转的界面标题应展示“售后”,无数据时界面应展示“暂无售后记录,搜索页的“查看详情”按钮加了样式

This commit is contained in:
2026-01-07 16:12:55 +08:00
parent 012b1339aa
commit d1cf57717b
87 changed files with 735 additions and 747 deletions

View File

@@ -145,7 +145,7 @@ export default {
if (isJump && route != 'pages/index/index') {
uni.setStorageSync('manual_change_store', true); // 手动切换门店
this.$store.dispatch('getCartNumber'); //重新获取购物车数据
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
},

View File

@@ -240,7 +240,7 @@ export default {
},
goHome() {
if (this.preview) return; // 开启预览,禁止任何操作和跳转
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
},
goCart() {
if (this.preview) return; // 开启预览,禁止任何操作和跳转

View File

@@ -66,15 +66,16 @@ export default {
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
var value = '';
let value = ''; // 存放解析后的语言值
let langPath = ''; // 存放当前页面语言包路径
try {
//公共语言包(同步加载)
var lang = loadLangPackSync(locale, 'common');
//当前页面语言包(同步加载)
let route = _this.route;
let langPath = processRoutePath(route);
console.log(`当前语言: ${locale}, 当前页面语言包路径: ${langPath}`);
langPath = processRoutePath(route);
// 加载当前页面语言包
let currentPageLang = loadLangPackSync(locale, langPath);
@@ -102,7 +103,7 @@ export default {
}
} catch (e) {
console.error('解析语言包失败:', e);
console.error('解析语言包失败:', e, { langPath, field, locale });
value = field;
}
@@ -115,7 +116,10 @@ export default {
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
// 多语言调试,注释后可以关闭控制台输出
console.log(`字段: ${field}, 值: ${value}`)
if (field == value) {
console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`);
}
return value;
},
/**

View File

@@ -7,15 +7,19 @@ import {
// 首页路径
// 关于页面路径,使用常量导出
export const INDEX_PAGE_URL = '/pages/index/index';
export const CATEGORY_PAGE_URL = '/pages_goods/category';
export const CONTACT_PAGE_URL = '/pages_tool/contact/contact';
export const MEMBER_PAGE_URL = '/pages_tool/member/index';
export const LOGIN_PAGE_URL = '/pages_tool/login/login';
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
export const systemTabBarList = [
INDEX_PAGE_URL,
'/pages_goods/category',
'/pages_tool/contact/contact',
'/pages_tool/member/index'
CATEGORY_PAGE_URL,
CONTACT_PAGE_URL,
MEMBER_PAGE_URL
];
/**
@@ -89,7 +93,7 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
const linkUrlParts = adaptSubpackageUrl(linkUrl).split('/');
const currentPageRouteParts = currentPageRoute.split('/');
console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
// console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
try {
// 二级页面
@@ -109,17 +113,24 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
}
export default {
/** 导出页面URL常量 */
MEMBER_PAGE_URL,
CATEGORY_PAGE_URL,
CONTACT_PAGE_URL,
INDEX_PAGE_URL,
LOGIN_PAGE_URL,
/**
* 页面跳转
* @param {string} to 跳转链接 /pages/idnex/index
* @param {Object} param 参数 {key : value, ...}
* @param {string} mode 模式
* @param {Object} param 参数 {key : value, ...}, 默认{}
* @param {string} mode 模式 navigateTo、redirectTo、reLaunch、tabbar, 默认navigateTo
*/
redirectTo(to, param, mode) {
redirectTo(to, param = {}, mode = 'navigateTo') {
let url = to;
// 替换url中的前缀
console.log('redirectTo', to, param, mode);
console.log('页面跳转 redirectTo', to, param, mode);
url = adaptSubpackageUrl(url);
console.log('adaptSubpackageUrl', url);
@@ -146,26 +157,26 @@ export default {
// 如果url不包含tabBarList中的路径根据mode判断跳转方式
switch (mode) {
case 'tabbar':
// 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
// 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。重置页面栈,仅保留 tabBar 页面
uni.switchTab({
url
});
break;
case 'redirectTo':
// 关闭当前页面,跳转到应用内的某个页面。
// 关闭当前页面,跳转到应用内的某个页面。替换栈顶页面长度不变上限10层
uni.redirectTo({
url
});
break;
case 'reLaunch':
// 关闭所有页面,打开到应用内的某个页面。
// 关闭所有页面,打开到应用内的某个页面。清空栈后打开新页面,长度=1
uni.reLaunch({
url
});
break;
default:
// 保留当前页面,跳转到应用内的某个页面
console.log('保留当前页面,跳转到应用内的某个页面', url);
// 保留当前页面,跳转到应用内的某个页面,新增页面到栈顶,长度+1上限10层
console.log('保留当前页面,navigateTo跳转到应用内的某个页面', url);
uni.navigateTo({
url
});
@@ -592,6 +603,9 @@ export default {
}
return cloneObj
},
/**
* 自定义模板的跳转链接
* @param {Object} link
@@ -792,7 +806,7 @@ export default {
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
return routes.length ? routes[routes.length - 1].route : '';
},
goBack(backUrl = '/pages/index/index') {
goBack(backUrl = INDEX_PAGE_URL) {
if (getCurrentPages().length == 1) {
this.redirectTo(backUrl);
} else {

View File

@@ -145,7 +145,7 @@ export default {
let linkUrl = link.wap_url;
// 首页特殊处理
if (linkUrl === '/pages/index/index' && this.name === 'DIY_VIEW_INDEX') {
if (linkUrl === this.$util.INDEX_PAGE_URL && this.name === 'DIY_VIEW_INDEX') {
return true;
}

View File

@@ -454,7 +454,7 @@ export default {
}
});
} else {
this.$refs.login.open('/pages/index/index');
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
this.couponBtnSwitch = false;
}
},

View File

@@ -90,7 +90,7 @@ export default {
// 页面跳转
redirectTo(item) {
if (!item.wap_url || this.$util.getCurrRoute() != 'pages/member/index' || this.storeToken) {
if (!item.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) {
console.log(item);
this.$util.diyRedirectTo(item);
} else {

View File

@@ -75,7 +75,7 @@ export default {
this.currentRoute = '/' + currentPage.route;
if (!this.storeToken) {
this.$util.redirectTo(
'/pages_tool/login/login',
this.$util.LOGIN_PAGE_URL,
{
back: this.currentRoute
},

View File

@@ -159,7 +159,7 @@ export default {
redirectTo(link) {
if (link.wap_url) {
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
this.$refs.login.open(link.wap_url);
return;
}

View File

@@ -116,7 +116,7 @@ export default {
// 页面跳转
redirectTo(link) {
if (!link.wap_url || this.$util.getCurrRoute() != 'pages/member/index' || this.storeToken) {
if (!link.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) {
this.$util.diyRedirectTo(link);
} else {
this.$refs.login.open(link.wap_url);

View File

@@ -62,8 +62,8 @@ export default {
methods: {
redirectTo(link) {
if (link.wap_url) {
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
this.$refs.login.open(link.wap_url);
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
this.$refs?.login?.open(link.wap_url);
return;
}
}

View File

@@ -64,7 +64,7 @@
@click.stop="modifyInfo()">{{ langIndex == 0 ? 'CN' : 'EN' }}</view>
</view>
<view class="info-wrap" v-else :style="infoStyle" @click="redirect('/pages/member/index')">
<view class="info-wrap" v-else :style="infoStyle" @click="redirect($util.MEMBER_PAGE_URL)">
<view class="headimg">
<image :src="$util.getDefaultImage().head" mode="widthFix"></image>
</view>
@@ -545,7 +545,7 @@ export default {
*/
redirectBeforeAuth(url) {
if (!this.storeToken) {
this.$refs.login.open('/pages/member/index');
this.$refs.login.open(this.$util.MEMBER_PAGE_URL);
return;
}
@@ -583,7 +583,7 @@ export default {
url: '/wechat/api/wechat/authcode',
data: {
scopes: 'snsapi_userinfo',
redirect_url: this.$config.h5Domain + '/pages/member/index'
redirect_url: this.$config.h5Domain + this.$util.MEMBER_PAGE_URL
},
success: res => {
if (res.code >= 0) {

View File

@@ -157,7 +157,7 @@ export default {
/* 点赞 */
giveLike(noteId, index) {
if (!this.storeToken) {
this.$refs.login.open('/pages/index/index');
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
return;
}

View File

@@ -65,7 +65,7 @@ export default {
},
redirectTo(link) {
if (link.wap_url) {
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
this.$refs.login.open(link.wap_url);
return;
}

View File

@@ -61,7 +61,7 @@ export default {
methods: {
redirectTo(link) {
if (link.wap_url) {
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
this.$refs.login.open(link.wap_url);
return;
}

View File

@@ -198,7 +198,7 @@ export default {
},
redirectTo(link) {
if (link.wap_url) {
if (this.$util.getCurrRoute() == 'pages/member/index' && !this.storeToken) {
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
this.$refs.login.open(link.wap_url);
return;
}

View File

@@ -270,7 +270,7 @@ export default {
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 1000)
}
}

View File

@@ -45,7 +45,7 @@ export default {
if (this.emptyBtn.url) {
this.$util.redirectTo(this.emptyBtn.url, {}, 'redirectTo');
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
},
re(text) {

View File

@@ -28,7 +28,7 @@ export default {
*/
addCart(config, data, event) {
if (!this.storeToken) {
this.$refs.login.open('/pages/index/index')
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
return;
}
if (config == "detail" || data.is_virtual) {

View File

@@ -413,7 +413,7 @@
this.isLoad = false;
if (callback) callback();
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -441,7 +441,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -467,7 +467,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -500,7 +500,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -527,7 +527,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -553,7 +553,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -579,7 +579,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -606,7 +606,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
@@ -630,7 +630,7 @@
this.skuId = res.data[0].sku_id;
this.goodsSkuInfo = obj;
} else {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});

View File

@@ -42,26 +42,22 @@
<!-- 协议勾选 -->
<view style="display: flex;">
<view
class="iconfont"
<view class="iconfont"
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
@click="isAgree = !isAgree"
></view>
@click="isAgree = !isAgree"></view>
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
我同意
<text style="color: #4395ff;" @click="tourl('/pages_tool/agreement/contenr?type=0')">隐私条款</text>
<text style="color: #4395ff;" @click="tourl('/pages_tool/agreement/contenr?type=1')">用户服务协议</text>
<text style="color: #4395ff;"
@click="tourl('/pages_tool/agreement/contenr?type=0')">隐私条款</text>
<text style="color: #4395ff;"
@click="tourl('/pages_tool/agreement/contenr?type=1')">用户服务协议</text>
</view>
</view>
<!-- 手机号授权按钮 -->
<block v-if="isAgree">
<button
class="auth-login save-btn border-0"
style="border: none;"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
<button class="auth-login save-btn border-0" style="border: none;" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
</button>
</block>
@@ -71,7 +67,8 @@
</button>
</block>
<view @click="closeLogin" style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
<view @click="closeLogin"
style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
暂不登录
</view>
@@ -254,7 +251,7 @@ export default {
},
// 打开弹窗
open(url) {
open(url = '', mode = 'navigateTo') {
if (url) this.url = url;
// #ifdef MP
this.getCode(authData => {
@@ -266,28 +263,33 @@ export default {
if (this.$util.isWeChatMiniProgram()) {
// 微信小程序环境,使用微信授权登录
let authData = uni.getStorageSync('authInfo');
if (authData) this.authLogin(authData);
else this.getCode();
if (authData) {
this.authLogin(authData);
} else {
this.getCode(authData => {
this.authLogin(authData, 'authOnlyLogin');
});
}
} else if (this.$util.isWeiXin()) {
// 微信浏览器环境,显示登录页面
this.toLogin();
this.toLogin(mode);
} else {
// 其他浏览器环境,显示登录页面
this.toLogin();
this.toLogin(mode);
}
// #endif
// #ifndef MP || H5
this.toLogin();
this.toLogin(mode);
// #endif
},
// 跳转去登录页
toLogin() {
if (this.url) this.$util.redirectTo('/pages_tool/login/login', {
toLogin(mode = 'navigateTo') {
if (this.url) this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: encodeURIComponent(this.url)
});
else this.$util.redirectTo('/pages_tool/login/login');
}, mode);
else this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {}, mode);
},
// 取消完善信息
@@ -535,7 +537,8 @@ export default {
getPhoneNumber(e) {
if (e.detail.errMsg === 'getPhoneNumber:ok') {
const authInfo = uni.getStorageSync('authInfo');
if (authInfo) { Object.assign(this.authMobileData, authInfo, e.detail);
if (authInfo) {
Object.assign(this.authMobileData, authInfo, e.detail);
}
if (uni.getStorageSync('source_member')) {
this.authMobileData.source_member = uni.getStorageSync('source_member');

View File

@@ -185,7 +185,7 @@ export default {
title: '未获取到支付信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 1500);
}
}

View File

@@ -138,7 +138,7 @@
break;
default:
if (this.back) this.$util.redirectTo(decodeURIComponent(this.back), {}, 'redirectTo');
else this.$util.redirectTo('/pages/index/index');
else this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
break;
}
}

View File

@@ -6,6 +6,6 @@ export const lang = {
Price:'价格',
Filter:'筛选',
Search:'请输入您要搜索的商品',
Make:'立即询底价',
Make:'查看详情',
}

View File

@@ -319,8 +319,9 @@ export default {
@import './public/css/list.scss';
</style>
<style scoped>
>>>.uni-tag--primary.uni-tag--inverted {
.uni-tag--primary.uni-tag--inverted {
background-color: #f5f5f5 !important;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {

View File

@@ -400,7 +400,7 @@
.price {
color: var(--price-color);
color: #fff !important;
font-size: 15rpx !important;
font-size: 27rpx !important;
font-weight: bold !important;
}
}

View File

@@ -0,0 +1,8 @@
export default {
methods: {
// 跳转至登录页
toLogin() {
this.$refs.login.open();
},
}
}

View File

@@ -669,7 +669,7 @@ export default {
this.getEvaluateConfig();
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
});
}

View File

@@ -161,7 +161,7 @@ export default {
if (this.storeToken) {
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_order/detail_point?order_id=' + this.orderId
});
}

View File

@@ -156,11 +156,12 @@
<ns-payment ref="choosePaymentPopup"></ns-payment>
<ns-payment ref="choosePaymentMergePopup"></ns-payment>
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
<!-- #ifdef MP -->
</mescroll-uni>
<!-- #endif -->
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
@@ -207,7 +208,7 @@ export default {
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
} else {
this.$nextTick(() => {
this.$refs.login.open('/pages_order/list?status=' + this.orderStatus);
this.$refs?.login?.open('/pages_order/list?status=' + this.orderStatus, 'redirectTo');
})
}
},

View File

@@ -196,7 +196,7 @@
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);
@@ -213,7 +213,7 @@
this.applyStatus();
this.getSourceMemberInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_promotion/fenxiao/apply'
}, 'redirectTo');
}
@@ -261,7 +261,7 @@
this.status = res.data.status;
this.isSub = false;
if (this.status == 2) {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
this.$refs.loadingCover.hide();
@@ -410,7 +410,7 @@
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
}
};

View File

@@ -40,7 +40,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -59,7 +59,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -307,7 +307,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'redirectTo');
}, 2000);
}
}, 1000);
@@ -348,7 +348,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 2000);
}
}
@@ -367,7 +367,7 @@ export default {
title: '当前分销商已冻结'
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 2000);
return;
}
@@ -457,7 +457,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
return true;
},
watch: {

View File

@@ -213,7 +213,7 @@
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);
@@ -224,7 +224,7 @@
this.getFenxiaoInfo();
this.getBasicsConfig();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_promotion/fenxiao/level'
});
}

View File

@@ -142,7 +142,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -105,7 +105,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);

View File

@@ -84,7 +84,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -65,7 +65,7 @@ export default {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/poster',
data: {
page: '/pages/index/index',
page: this.$util.INDEX_PAGE_URL,
qrcode_param: JSON.stringify({}),
template_id: id
},
@@ -154,7 +154,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -27,7 +27,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);
@@ -40,7 +40,7 @@ export default {
if (!this.storeToken) {
this.$util.redirectTo(
'/pages_tool/login/login', {
this.$util.LOGIN_PAGE_URL, {
back: '/pages_promotion/fenxiao/goods_list'
},
'redirectTo'

View File

@@ -113,7 +113,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -90,7 +90,7 @@
this.getBankAccountInfo();
this.getWithdrawInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_promotion/fenxiao/withdraw_apply'
});
}

View File

@@ -70,7 +70,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -67,7 +67,7 @@ export default {
if (this.storeToken) {
this.getDetail();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_promotion/fenxiao/withdraw_list'
}, 'redirectTo');
}

View File

@@ -302,7 +302,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);
@@ -544,7 +544,7 @@ export default {
if (getCurrentPages().length > 1) uni.navigateBack({
delta: 1
});
else this.$util.redirectTo('/pages/index/index');
else this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
},
getNewestGame() {
this.$api.sendRequest({

View File

@@ -120,7 +120,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'redirectTo');
}, 2000);
}
}, 1000);

View File

@@ -95,7 +95,7 @@ export default {
title: '未获取到创建订单所需数据!'
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 1500);
}
return;
@@ -122,7 +122,7 @@ export default {
title: '未获取到创建订单所需数据!'
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 1500);
}
},
@@ -547,7 +547,7 @@ export default {
}
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getOrderPaymentData();
}

View File

@@ -23,7 +23,7 @@
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
},
toIndex() {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
};

View File

@@ -14,7 +14,6 @@
</view>
</view>
</view>
<!-- <view @click="test()">Test</view> -->
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="view_ul view_ul_one clearfix">
@@ -44,7 +43,6 @@
<view class="text" style="font-size: 40rpx;font-weight: 600;color:#333">
{{ item.realname }}</view>
<view class="text">{{ item.position }}</view>
<!-- <view class="text">{{item.mobile_text}}{{item.mobile}}</view> -->
<view class="text" style="padding-bottom:20rpx;color:#0054a5">{{ item.address }}</view>
<view class="contact_name" v-if="item.mobile"
style="padding-top:30rpx;padding-bottom:0rpx;border-top: solid 1px #eee;font-size:28rpx;display: flex;">
@@ -65,20 +63,6 @@
</view>
</view>
</view>
<!-- <view class="view_ul view_ul_two clearfix " v-if="dataList.length > 3" >
<view @click="Tel(item.mobile)" class="view_li w50_li" v-for="(item,index) in dataList" >
<view class="bl bor" hoverClass="none" url="" style="box-shadow: 5rpx 5rpx 10rpx #dcdcdc;height: 230rpx;position: relative;">
<view class="contact_name" v-if="item.position">{{item.position_text}}{{item.position}}</view>
<view class="contact_name">{{item.title_text}}{{item.realname}}</view>
<view class="contact_name">{{item.mobile_text}}{{item.mobile}}</view>
<view class="contact_name" style="padding-bottom:10rpx;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">{{item.address_text}}{{item.address}}</view>
<view class="contact_name" style="padding-top:10rpx;padding-bottom:0rpx;border-top: solid 1px #eee;position: absolute;bottom: 0;display: flex">
<image mode="widthFix":src="$util.img('public/static/img/boda.png')"></image>
<view style="margin-top: -6rpx;margin-left: 10rpx;font-size: 24rpx;color:rgba(71,71,71,.79)">点击拨打电话</view>
</view>
</view>
</view>
</view> -->
<map v-if="shop.longitude > 0 && shop.latitude > 0 && ismessage == 0" id="map"
style="width: 100%; height:400rpx" scale="12" :markers="markers" bindupdated="bindupdated"
:longitude="shop.longitude" :latitude="shop.latitude" show-location>
@@ -90,14 +74,6 @@
</view>
</view>
<!-- <view wx:if="landline !=0">
<button bindtap="contact">
<view class="message">
<image mode="widthFix" src="{{contactbg}}"></image>
</view>
</button>
</view> -->
</view>
<!--留言弹窗-->
<view class="goods-sku">
@@ -113,20 +89,43 @@
<view class="fui-cell ">
<view class="fui-cell-label ">{{ $lang('name') }}</view>
<view class="fui-cell-info">
<input v-model="Form.realname" class="fui-input" :placeholder="$lang('pleaseEnterName')":key="formKey" value=""></input>
<input
id="input-realname"
:value="Form.realname"
@input="e => Form.realname = e.detail.value"
class="fui-input"
:placeholder="$lang('pleaseEnterName')"
:key="formKey"
/>
</view>
</view>
<view class="fui-cell ">
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
<view class="fui-cell-info">
<input v-model="Form.mobile" class="fui-input" maxlength="11" :placeholder="$lang('pleaseEnterMobile')" type="number":key="formKey"></input>
<input
id="input-mobile"
:value="Form.mobile"
@input="e => Form.mobile = e.detail.value"
class="fui-input"
maxlength="11"
:placeholder="$lang('pleaseEnterMobile')"
type="number"
:key="formKey"
/>
</view>
</view>
<view class="fui-cell ">
<view class="fui-cell-label" style="position: absolute;top:10px">{{ $lang('messageContent') }}</view>
<view class="fui-cell-info" style="margin-left: 160rpx;border: solid 2rpx #eee;">
<!-- <input v-model="Form.mailbox" class="fui-input" placeholder="请输入您的邮箱" type="text" ></input> -->
<textarea class="textarea" v-model="Form.remark" :placeholder="$lang('pleaseEnterMessage')" style="font-size: 28rpx;padding: 10rpx;":key="formKey"></textarea>
<textarea
id="textarea-remark"
:value="Form.remark"
@input="e => Form.remark = e.detail.value"
class="textarea"
:placeholder="$lang('pleaseEnterMessage')"
style="font-size: 28rpx;padding: 10rpx;"
:key="formKey"
></textarea>
</view>
</view>
</view>
@@ -149,29 +148,20 @@ export default {
mixins: [scroll],
data() {
return {
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离
minScrollTop: 100,
dataList: [],
ismessage: 0,
Form: {
realname: '',
mobile: '',
remark: ''
},
formKey: Date.now(),
markers: [
{
id: 1,
/* width:20, //宽度
height:20, //高度*/
// iconPath: '../../static/goal_weizhi.png', //目标位置图标路径
//这里的经纬度是 目的地 的经纬度
latitude: 0,
longitude: 0,
callout: {
/* title:123,
content:'123' */
}
}
],
landline: 0,
@@ -183,45 +173,25 @@ export default {
};
},
onLoad(option) {
//刷新多语言
this.$langConfig.refresh();
this.$api.sendRequest({
url: '/api/member/personnel',
success: res => {
if (res.code == 0) {
this.dataList = res.data
this.shop = res.shop
this.personnel_bg = res.set.personnel_bg ? res.set.personnel_bg : 'public/static/img/diy_view/member_info_bg.png'
this.dataList = res.data;
this.shop = res.shop;
this.personnel_bg = res.set.personnel_bg ? res.set.personnel_bg : 'public/static/img/diy_view/member_info_bg.png';
this.markers = [{
id: 1,
//iconPath:'http://saas.cn//public/static/img/kefu.png',
latitude: this.shop.latitude,
longitude: this.shop.longitude
}]
}];
}
},
fail: res => {
}
fail: res => {}
});
},
methods: {
test() {
// channelReady(function(bAvailable) {
// alert('是否存在框架服务:' + bAvailable)
// })
// window.location.href = 'https://hapjs.org/app//[path][?key=value] hap://app//[path][?key=value] '
//参数说明: package: 应用包名,必选 path: 应用内页面的 path可选默认为首页 key-value: 希望传给页面的参数,可选,可以有多个
// const isQuickAppEnv = navigator.userAgent.includes('HuaweiQuickApp');
// let quickAppBridge;
// console.log(window.quickapp)
// if (isQuickAppEnv) {
// quickAppBridge = window.quickapp;
// }
// quickAppBridge.invoke('startQuickAppPage', { page: '/NativePage' });
// window.postMessage({ action: 'someAction', data: 'some data' }, '*');
// window.open('https://xcx10.5g-quickapp.com/test.php')
},
save() {
if (!this.Form.realname.trim()) {
uni.showToast({ title: '请填写姓名', icon: 'none' });
@@ -240,51 +210,88 @@ export default {
url: '/api/member/message',
data: this.Form,
success: res => {
this.$refs.informationPopup.close();
uni.showToast({ title: res.message || '提交成功', icon: 'success' });
// 重置表单数据
this.Form = { realname: '', mobile: '', remark: '' };
this.formKey = Date.now();
// 关闭弹窗
this.$refs.informationPopup.close();
// 微信小程序:延迟清空原生输入框(确保 DOM 已更新)
// #ifdef MP-WEIXIN
setTimeout(() => {
this.clearInputValues();
}, 100);
// #endif
},
fail: () => {
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
}
});
},
change(e) {
console.log(e)
this.ismessage = e.show ? 1 : 0
},
//留言打开
tapMessage() {
// 清空表单数据
this.Form = {
realname: '',
mobile: '',
remark: ''
};
// 关键:更新 key强制重建输入框
this.formKey = Date.now();
change(e) {
this.ismessage = e.show ? 1 : 0;
},
tapMessage() {
// 重置数据
this.Form = { realname: '', mobile: '', remark: '' };
this.formKey = Date.now();
this.ismessage = 1;
this.$refs.informationPopup.open();
// 微信小程序:打开后清空原生输入框
// #ifdef MP-WEIXIN
setTimeout(() => {
this.clearInputValues();
}, 300); // 确保弹窗已渲染
// #endif
},
//留言关闭
closeinformationPopup() {
this.ismessage = 0
this.ismessage = 0;
this.$refs.informationPopup.close();
// 微信小程序:关闭后也清空(防止下次打开残留)
// #ifdef MP-WEIXIN
setTimeout(() => {
this.clearInputValues();
}, 100);
// #endif
},
// 专门用于微信小程序清空原生 input/textarea
clearInputValues() {
// #ifdef MP-WEIXIN
const query = uni.createSelectorQuery().in(this);
// 分别清空每个输入框
['input-realname', 'input-mobile', 'textarea-remark'].forEach(id => {
query.select('#' + id).fields({ node: true }, (res) => {
if (res && res.node) {
res.node.value = '';
}
}).exec();
});
// #endif
},
Tel(m) {
uni.makePhoneCall({
phoneNumber: m + '',
success(e) {
console.log(e)
console.log(e);
}
})
});
},
copy(text) {
uni.setClipboardData({
data: text,
success: () => {
console.log('复制成功');
// 可以添加用户友好的提示例如使用uni.showToast提示复制成功
uni.showToast({
title: this.$lang('copySuccess'),
icon: 'success',
@@ -292,8 +299,6 @@ export default {
});
},
fail: (err) => {
console.log('复制失败');
// 可以添加错误处理或用户友好的提示
uni.showToast({
title: err.message || err.errMsg || this.$lang('copyFailed'),
icon: 'none',
@@ -302,12 +307,13 @@ export default {
}
});
},
tomap() {
uni.openLocation({
latitude: parseFloat(this.shop.latitude),
longitude: parseFloat(this.shop.longitude),
name: this.$lang('oneClickNavigation'),
})
});
}
}
};
@@ -461,14 +467,6 @@ image {
z-index: 0;
}
image {
max-width: 100%;
}
.bl {
display: block;
}
.line1 {
overflow: hidden;
text-overflow: ellipsis;
@@ -506,18 +504,12 @@ image {
border-radius: 10rpx;
}
.view_ul_100 .fl {
width: 10%;
}
.view_ul_100 .fr {
/* padding-left: 30rpx;*/
width: 100%;
}
.view_ul_100>view {
background: #fff;
// box-shadow: 5rpx 5rpx 10rpx #dcdcdc;
}
.view_ul_100 .text {
@@ -534,26 +526,6 @@ image {
padding: 20rpx 30rpx 0rpx 30rpx;
}
.list_cotact .view_ul_two .view_li>view {
background-color: #fff;
padding: 20rpx 30rpx 0rpx 30rpx;
}
.list_cotact .view_ul_two .view_li>view .address {
background-color: #5dc2d0;
color: #fff;
display: inline-block;
font-size: 28rpx;
line-height: 48rpx;
margin-bottom: 30rpx;
padding: 0 30rpx;
width: auto;
}
.view_ul_two {
margin-top: 20rpx;
}
.contact_name {
color: rgba(71, 71, 71, .79);
font-size: 24rpx;
@@ -575,7 +547,7 @@ image {
color: #fff;
font-size: 24rpx;
border-radius: 50rpx;
width: 160rpx; // 足够容纳4个汉字(8个字符)
width: 160rpx;
display: inline-block;
text-align: center;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15), 0 1rpx 3rpx rgba(0, 0, 0, 0.1);
@@ -587,7 +559,6 @@ image {
}
.message {
/* background-color: rgba(0,0,0,.8); */
border-radius: 50%;
bottom: 50%;
height: 90rpx;

View File

@@ -99,7 +99,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
}, 1000);

View File

@@ -58,7 +58,7 @@
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);

View File

@@ -128,7 +128,7 @@ export default {
if (this.stepShow > 0) {
this.stepShow -= 1;
} else {
this.$util.redirectTo('/pages_tool/login/login', '', 'redirectTo');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, '', 'redirectTo');
}
},
// 下一步
@@ -318,7 +318,7 @@ export default {
uni.removeStorage({
key: 'forgot_password_token'
});
this.$util.redirectTo('/pages_tool/login/login', {}, 'redirectTo');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {}, 'redirectTo');
}, 1000);
} else {
this.stepShow -= 1;

View File

@@ -234,13 +234,13 @@ export default {
this.$util.showToast({
title: this.$lang('loginSuccessTip')
});
let back = this.back ? this.back : '/pages/member/index';
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
}
}
});
@@ -348,13 +348,13 @@ export default {
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, this.redirect);
}
}
})

View File

@@ -78,7 +78,7 @@
this.getWithdrawInfo();
this.getBankAccountInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_tool/member/apply_withdrawal'
});
}
@@ -109,7 +109,7 @@
title: '未开启提现'
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 1500);
}
}

View File

@@ -92,7 +92,7 @@ export default {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getAccountInfo();
}

View File

@@ -6,7 +6,7 @@
'height': menuButtonBounding.height + 'px'
}">
<view class="navbar-wrap">
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
<view class="navbar-title">
账户余额
</view>
@@ -171,7 +171,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
return true;
},
watch: {

View File

@@ -31,7 +31,7 @@ export default {
if (option.back) this.back = option.back;
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getCancelAgreement();
}

View File

@@ -26,7 +26,7 @@ export default {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getStatus();
}
@@ -43,7 +43,7 @@ export default {
});
},
toIndex() {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
},
apply() {
this.$util.redirectTo('/pages_tool/member/cancellation');

View File

@@ -46,7 +46,7 @@
onLoad(option) {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getStatus();
}
@@ -71,13 +71,13 @@
this.$store.commit('setMemberInfo', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});
},
back() {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
},
revoke() {
uni.showModal({
@@ -90,7 +90,7 @@
url: '/membercancel/api/membercancel/cancelApply',
success: res => {
if (res.code >= 0) {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});

View File

@@ -25,7 +25,7 @@
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getStatus();
}
@@ -40,7 +40,7 @@
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
}

View File

@@ -183,7 +183,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
}
};
@@ -220,7 +220,7 @@ export default {
}
</style>
<style scoped>
<style lang="scss" scoped>
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}

View File

@@ -418,7 +418,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
}
};

View File

@@ -1,8 +1,7 @@
<template>
<view :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
v-if="storeToken">
<view class="goods_list" slot="list">
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh">
<block class="goods_list" slot="list">
<block v-if="collectionList.length > 0">
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
@click.stop="toDetail(item)">
@@ -30,12 +29,15 @@
</view>
</block>
<!-- 第一个列表为空时 -->
<view v-if="collectionList.length == 0 && isShowEmpty" class="empty-with-btn">
<ns-empty text="暂无关注的商品" :isIndex="false"></ns-empty>
<button class="go-browse-btn" @click="goToBrowse">去逛逛</button>
<view class="collection-empty" v-else>
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品" subText="赶紧去逛逛, 关注心仪的商品吧"
:isIndex="Boolean(storeToken)" :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
@click="toLogin">{{ $lang('toLogin') }}</button>
</view>
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
</view>
</block>
</mescroll-uni>
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
@@ -43,27 +45,20 @@
</template>
<script>
import common from './public/js/common.js';
import collection from './public/js/collection.js';
export default {
mixins: [collection],
mixins: [common, collection],
data() {
return {};
},
methods: {
goToBrowse() {
// 跳转到首页
uni.switchTab({
url: '/pages/index/index'
});
}
},
onShow() {
if (this.storeToken) {
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
} else {
this.$nextTick(() => {
this.$refs.login.open('/pages_tool/member/collection');
this.$refs.loadingCover.hide();
});
}
},
@@ -88,24 +83,6 @@ export default {
}
@import './public/css/collection.scss';
.empty-with-btn {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 40rpx;
}
.go-browse-btn {
width: 200rpx;
height: 60rpx;
line-height: 60rpx;
background-color: #ff2f55;
color: #ffffff;
border-radius: 30rpx;
font-size: 28rpx;
margin-top: 40rpx;
}
</style>
<style lang="scss" scoped>

View File

@@ -60,7 +60,7 @@
</view>
</view>
<view v-if="!list.length && showEmpty" class="margin-top cart-empty" :fixed="false">
<ns-empty :isIndex="true" :emptyBtn="{url: '/pages/index/index',text: '去逛逛'}" text="暂无优惠券"></ns-empty>
<ns-empty :isIndex="true" :emptyBtn="{url: $util.INDEX_PAGE_URL,text: '去逛逛'}" text="暂无优惠券"></ns-empty>
</view>
</block>
</mescroll-uni>
@@ -93,7 +93,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);

View File

@@ -46,7 +46,7 @@
</view>
</view>
<view class="footprint-empty" v-else>
<ns-empty text="暂无浏览过的商品" :isIndex="Boolean(storeToken)" :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
<ns-empty text="暂无浏览过的商品" subText="赶紧去逛逛, 发现更多商品吧" :isIndex="Boolean(storeToken)" :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
@click="toLogin">{{ $lang('toLogin') }}</button>
</view>

View File

@@ -96,7 +96,7 @@ export default {
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});
@@ -118,7 +118,7 @@ export default {
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
} else {
this.$util.showToast({
title: rres.message

View File

@@ -354,7 +354,7 @@
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
},
watch: {

View File

@@ -40,7 +40,7 @@
onShow() {
if (!this.storeToken) {
this.$util.redirectTo(
'/pages_tool/login/login', {
this.$util.LOGIN_PAGE_URL, {
back: '/pages_tool/member/modify_face'
},
'redirectTo'

View File

@@ -40,7 +40,7 @@
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
if (this.memberInfo.mobile == '') {
uni.showModal({
@@ -54,7 +54,7 @@
}, 'redirectTo');
} else {
if (this.back) this.$util.redirectTo(this.back);
else this.$util.redirectTo('/pages/member/index');
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});
@@ -133,7 +133,7 @@
setTimeout(() => {
if (this.back) this.$util.redirectTo(this.back, {},
'redirectTo');
else this.$util.redirectTo('/pages/member/index');
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 2000);
} else {
this.initInfo();

View File

@@ -7,7 +7,7 @@
}"
>
<view class="navbar-wrap">
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
<view class="navbar-title">
我的积分
</view>
@@ -143,7 +143,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
return true;
},
watch: {

View File

@@ -74,7 +74,7 @@ export default {
onShow() {
if (!this.storeToken) {
this.$util.redirectTo(
'/pages_tool/login/login',
this.$util.LOGIN_PAGE_URL,
{
back: '/pages_tool/member/point'
},

View File

@@ -0,0 +1,9 @@
export default {
methods: {
// 跳转至登录页
toLogin(url) {
console.log('跳转至登录页', {url, currentRoute: this.$util.getCurrentRoute()});
this.$refs.login.open(url ?? this.$util.getCurrentRoute());
}
}
}

View File

@@ -256,7 +256,7 @@ export default {
this.$store.dispatch('emptyCart');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
} else {
this.$util.showToast({
title: rres.message
@@ -329,7 +329,7 @@ export default {
this.$store.dispatch('emptyCart');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});

View File

@@ -51,7 +51,7 @@ export default {
this.$refs.rulePopup.close();
},
copyUrl() {
let text = this.$config.h5Domain + '/pages/index/index';
let text = this.$config.h5Domain + this.$util.INDEX_PAGE_URL;
if (this.memberInf && this.memberInfo.member_id) text += '?source_member=' + this.memberInfo.member_id;
this.$util.copy(text, () => {
this.closeSharePopup();
@@ -76,7 +76,7 @@ export default {
this.$api.sendRequest({
url: "/memberrecommend/api/memberrecommend/poster",
data: {
page: '/pages/index/index',
page: this.$util.INDEX_PAGE_URL,
qrcode_param: JSON.stringify(qrcode_param)
},
success: res => {

View File

@@ -33,7 +33,7 @@ export default {
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 2000);
}
},1000);
@@ -106,7 +106,7 @@ export default {
if (this.back != '') {
this.$util.redirectTo(this.back, {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
},
//获取rule

View File

@@ -40,7 +40,7 @@ export default {
onShow() {
if (!this.storeToken) {
this.$util.redirectTo(
'/pages_tool/login/login',
this.$util.LOGIN_PAGE_URL,
{
back: '/pages_tool/member/point'
},

View File

@@ -69,7 +69,7 @@ export default {
this.getDetail();
} else {
this.$util.redirectTo(
'/pages_tool/login/login',
this.$util.LOGIN_PAGE_URL,
{
back: '/pages_tool/member/point'
},

View File

@@ -91,7 +91,7 @@ export default {
onShow() {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getPackageInfo();
}

View File

@@ -27,7 +27,7 @@ export default {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_tool/order/evaluate?order_id=' + this.orderId
}, 'redirectTo');
}

View File

@@ -130,7 +130,7 @@ export default {
if (this.storeToken) {
this.getRefundData();
} else {
this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id });
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id });
}
},
methods: {

View File

@@ -122,7 +122,7 @@ export default {
if (this.storeToken) {
this.getRefundData();
} else {
this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id });
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id });
}
},
methods: {

View File

@@ -175,7 +175,7 @@ export default {
if (this.storeToken) {
this.getRefundDetail();
} else {
this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_tool/order/refund_detail?order_goods_id=' + this.order_goods_id });
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_tool/order/refund_detail?order_goods_id=' + this.order_goods_id });
}
},
methods: {

View File

@@ -41,7 +41,7 @@
if (this.storeToken) {
this.getRefundData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
});
}

View File

@@ -33,7 +33,7 @@ export default {
onShow() {
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getPayInfo();
}
@@ -54,7 +54,7 @@ export default {
title: '未获取到支付信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}, 1500);
}
},

View File

@@ -91,7 +91,7 @@
this.$util.redirectTo('/pages_tool/member/coupon', {});
break;
default:
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
break;
}
},
@@ -133,7 +133,7 @@
title: '未获取到支付信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'reLaunch');
}, 1500);
}
},
@@ -143,7 +143,7 @@
});
},
goHome() {
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'reLaunch');
},
toOrderDetail(id) {
if (this.payInfo.order_type == 2) {

View File

@@ -30,7 +30,7 @@ export default {
data: {},
success: res => {
if (res.code == 0) {
this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
}
}
});