chore:在线留言提交后,再次打开在线留言,输入框里没有上次留言内容,查看我的关注,暂无关注的商品,应展示去逛逛按钮,点击售后,跳转的界面标题应展示“售后”,无数据时界面应展示“暂无售后记录,搜索页的“查看详情”按钮加了样式
This commit is contained in:
@@ -145,7 +145,7 @@ export default {
|
|||||||
if (isJump && route != 'pages/index/index') {
|
if (isJump && route != 'pages/index/index') {
|
||||||
uni.setStorageSync('manual_change_store', true); // 手动切换门店
|
uni.setStorageSync('manual_change_store', true); // 手动切换门店
|
||||||
this.$store.dispatch('getCartNumber'); //重新获取购物车数据
|
this.$store.dispatch('getCartNumber'); //重新获取购物车数据
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goHome() {
|
goHome() {
|
||||||
if (this.preview) return; // 开启预览,禁止任何操作和跳转
|
if (this.preview) return; // 开启预览,禁止任何操作和跳转
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
},
|
},
|
||||||
goCart() {
|
goCart() {
|
||||||
if (this.preview) return; // 开启预览,禁止任何操作和跳转
|
if (this.preview) return; // 开启预览,禁止任何操作和跳转
|
||||||
|
|||||||
@@ -66,15 +66,16 @@ export default {
|
|||||||
|
|
||||||
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
||||||
|
|
||||||
var value = '';
|
let value = ''; // 存放解析后的语言值
|
||||||
|
let langPath = ''; // 存放当前页面语言包路径
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//公共语言包(同步加载)
|
//公共语言包(同步加载)
|
||||||
var lang = loadLangPackSync(locale, 'common');
|
var lang = loadLangPackSync(locale, 'common');
|
||||||
|
|
||||||
//当前页面语言包(同步加载)
|
//当前页面语言包(同步加载)
|
||||||
let route = _this.route;
|
let route = _this.route;
|
||||||
let langPath = processRoutePath(route);
|
langPath = processRoutePath(route);
|
||||||
console.log(`当前语言: ${locale}, 当前页面语言包路径: ${langPath}`);
|
|
||||||
|
|
||||||
// 加载当前页面语言包
|
// 加载当前页面语言包
|
||||||
let currentPageLang = loadLangPackSync(locale, langPath);
|
let currentPageLang = loadLangPackSync(locale, langPath);
|
||||||
@@ -102,7 +103,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('解析语言包失败:', e);
|
console.error('解析语言包失败:', e, { langPath, field, locale });
|
||||||
value = field;
|
value = field;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +116,10 @@ export default {
|
|||||||
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
|
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
|
||||||
|
|
||||||
// 多语言调试,注释后可以关闭控制台输出
|
// 多语言调试,注释后可以关闭控制台输出
|
||||||
console.log(`字段: ${field}, 值: ${value}`)
|
if (field == value) {
|
||||||
|
console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`);
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,15 +7,19 @@ import {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 首页路径
|
// 关于页面路径,使用常量导出
|
||||||
export const INDEX_PAGE_URL = '/pages/index/index';
|
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 配置)
|
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
|
||||||
export const systemTabBarList = [
|
export const systemTabBarList = [
|
||||||
INDEX_PAGE_URL,
|
INDEX_PAGE_URL,
|
||||||
'/pages_goods/category',
|
CATEGORY_PAGE_URL,
|
||||||
'/pages_tool/contact/contact',
|
CONTACT_PAGE_URL,
|
||||||
'/pages_tool/member/index'
|
MEMBER_PAGE_URL
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,7 +93,7 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
|
|||||||
const linkUrlParts = adaptSubpackageUrl(linkUrl).split('/');
|
const linkUrlParts = adaptSubpackageUrl(linkUrl).split('/');
|
||||||
const currentPageRouteParts = currentPageRoute.split('/');
|
const currentPageRouteParts = currentPageRoute.split('/');
|
||||||
|
|
||||||
console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
|
// console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 二级页面
|
// 二级页面
|
||||||
@@ -109,17 +113,24 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
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 {string} to 跳转链接 /pages/idnex/index
|
||||||
* @param {Object} param 参数 {key : value, ...}
|
* @param {Object} param 参数 {key : value, ...}, 默认{}
|
||||||
* @param {string} mode 模式
|
* @param {string} mode 模式 navigateTo、redirectTo、reLaunch、tabbar, 默认navigateTo
|
||||||
*/
|
*/
|
||||||
redirectTo(to, param, mode) {
|
redirectTo(to, param = {}, mode = 'navigateTo') {
|
||||||
let url = to;
|
let url = to;
|
||||||
|
|
||||||
// 替换url中的前缀
|
// 替换url中的前缀
|
||||||
console.log('redirectTo', to, param, mode);
|
console.log('页面跳转 redirectTo', to, param, mode);
|
||||||
url = adaptSubpackageUrl(url);
|
url = adaptSubpackageUrl(url);
|
||||||
console.log('adaptSubpackageUrl', url);
|
console.log('adaptSubpackageUrl', url);
|
||||||
|
|
||||||
@@ -146,26 +157,26 @@ export default {
|
|||||||
// 如果url不包含tabBarList中的路径,根据mode判断跳转方式
|
// 如果url不包含tabBarList中的路径,根据mode判断跳转方式
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'tabbar':
|
case 'tabbar':
|
||||||
// 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
|
// 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。重置页面栈,仅保留 tabBar 页面
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'redirectTo':
|
case 'redirectTo':
|
||||||
// 关闭当前页面,跳转到应用内的某个页面。
|
// 关闭当前页面,跳转到应用内的某个页面。替换栈顶页面,长度不变(上限10层)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'reLaunch':
|
case 'reLaunch':
|
||||||
// 关闭所有页面,打开到应用内的某个页面。
|
// 关闭所有页面,打开到应用内的某个页面。清空栈后打开新页面,长度=1
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// 保留当前页面,跳转到应用内的某个页面
|
// 保留当前页面,跳转到应用内的某个页面,新增页面到栈顶,长度+1(上限10层)
|
||||||
console.log('保留当前页面,跳转到应用内的某个页面', url);
|
console.log('保留当前页面,navigateTo跳转到应用内的某个页面', url);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
@@ -592,6 +603,9 @@ export default {
|
|||||||
}
|
}
|
||||||
return cloneObj
|
return cloneObj
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义模板的跳转链接
|
* 自定义模板的跳转链接
|
||||||
* @param {Object} link
|
* @param {Object} link
|
||||||
@@ -792,7 +806,7 @@ export default {
|
|||||||
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||||
return routes.length ? routes[routes.length - 1].route : '';
|
return routes.length ? routes[routes.length - 1].route : '';
|
||||||
},
|
},
|
||||||
goBack(backUrl = '/pages/index/index') {
|
goBack(backUrl = INDEX_PAGE_URL) {
|
||||||
if (getCurrentPages().length == 1) {
|
if (getCurrentPages().length == 1) {
|
||||||
this.redirectTo(backUrl);
|
this.redirectTo(backUrl);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export default {
|
|||||||
let linkUrl = link.wap_url;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -454,7 +454,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$refs.login.open('/pages/index/index');
|
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
|
||||||
this.couponBtnSwitch = false;
|
this.couponBtnSwitch = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
|
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
redirectTo(item) {
|
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);
|
console.log(item);
|
||||||
this.$util.diyRedirectTo(item);
|
this.$util.diyRedirectTo(item);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
this.currentRoute = '/' + currentPage.route;
|
this.currentRoute = '/' + currentPage.route;
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login',
|
this.$util.LOGIN_PAGE_URL,
|
||||||
{
|
{
|
||||||
back: this.currentRoute
|
back: this.currentRoute
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export default {
|
|||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
|
|
||||||
if (link.wap_url) {
|
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);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
|
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
redirectTo(link) {
|
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);
|
this.$util.diyRedirectTo(link);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.login.open(link.wap_url);
|
this.$refs.login.open(link.wap_url);
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
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);
|
this.$refs?.login?.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
@click.stop="modifyInfo()">{{ langIndex == 0 ? 'CN' : 'EN' }}</view>
|
@click.stop="modifyInfo()">{{ langIndex == 0 ? 'CN' : 'EN' }}</view>
|
||||||
</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">
|
<view class="headimg">
|
||||||
<image :src="$util.getDefaultImage().head" mode="widthFix"></image>
|
<image :src="$util.getDefaultImage().head" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -545,7 +545,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
redirectBeforeAuth(url) {
|
redirectBeforeAuth(url) {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$refs.login.open('/pages/member/index');
|
this.$refs.login.open(this.$util.MEMBER_PAGE_URL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,7 +583,7 @@ export default {
|
|||||||
url: '/wechat/api/wechat/authcode',
|
url: '/wechat/api/wechat/authcode',
|
||||||
data: {
|
data: {
|
||||||
scopes: 'snsapi_userinfo',
|
scopes: 'snsapi_userinfo',
|
||||||
redirect_url: this.$config.h5Domain + '/pages/member/index'
|
redirect_url: this.$config.h5Domain + this.$util.MEMBER_PAGE_URL
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
/* 点赞 */
|
/* 点赞 */
|
||||||
giveLike(noteId, index) {
|
giveLike(noteId, index) {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$refs.login.open('/pages/index/index');
|
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
},
|
},
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
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);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
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);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export default {
|
|||||||
},
|
},
|
||||||
redirectTo(link) {
|
redirectTo(link) {
|
||||||
if (link.wap_url) {
|
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);
|
this.$refs.login.open(link.wap_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
if (this.emptyBtn.url) {
|
if (this.emptyBtn.url) {
|
||||||
this.$util.redirectTo(this.emptyBtn.url, {}, 'redirectTo');
|
this.$util.redirectTo(this.emptyBtn.url, {}, 'redirectTo');
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
re(text) {
|
re(text) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
addCart(config, data, event) {
|
addCart(config, data, event) {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$refs.login.open('/pages/index/index')
|
this.$refs.login.open(this.$util.INDEX_PAGE_URL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config == "detail" || data.is_virtual) {
|
if (config == "detail" || data.is_virtual) {
|
||||||
|
|||||||
@@ -413,7 +413,7 @@
|
|||||||
this.isLoad = false;
|
this.isLoad = false;
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} 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.skuId = res.data[0].sku_id;
|
||||||
this.goodsSkuInfo = obj;
|
this.goodsSkuInfo = obj;
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,26 +42,22 @@
|
|||||||
|
|
||||||
<!-- 协议勾选 -->
|
<!-- 协议勾选 -->
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view
|
<view class="iconfont"
|
||||||
class="iconfont"
|
|
||||||
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
|
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
|
||||||
@click="isAgree = !isAgree"
|
@click="isAgree = !isAgree"></view>
|
||||||
></view>
|
|
||||||
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
|
<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;"
|
||||||
<text style="color: #4395ff;" @click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
|
@click="tourl('/pages_tool/agreement/contenr?type=0')">《隐私条款》</text>
|
||||||
|
<text style="color: #4395ff;"
|
||||||
|
@click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 手机号授权按钮 -->
|
<!-- 手机号授权按钮 -->
|
||||||
<block v-if="isAgree">
|
<block v-if="isAgree">
|
||||||
<button
|
<button class="auth-login save-btn border-0" style="border: none;" open-type="getPhoneNumber"
|
||||||
class="auth-login save-btn border-0"
|
@getphonenumber="getPhoneNumber">
|
||||||
style="border: none;"
|
|
||||||
open-type="getPhoneNumber"
|
|
||||||
@getphonenumber="getPhoneNumber"
|
|
||||||
>
|
|
||||||
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
|
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
|
||||||
</button>
|
</button>
|
||||||
</block>
|
</block>
|
||||||
@@ -71,7 +67,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</block>
|
</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>
|
</view>
|
||||||
|
|
||||||
@@ -254,7 +251,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
open(url) {
|
open(url = '', mode = 'navigateTo') {
|
||||||
if (url) this.url = url;
|
if (url) this.url = url;
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
this.getCode(authData => {
|
this.getCode(authData => {
|
||||||
@@ -266,28 +263,33 @@ export default {
|
|||||||
if (this.$util.isWeChatMiniProgram()) {
|
if (this.$util.isWeChatMiniProgram()) {
|
||||||
// 微信小程序环境,使用微信授权登录
|
// 微信小程序环境,使用微信授权登录
|
||||||
let authData = uni.getStorageSync('authInfo');
|
let authData = uni.getStorageSync('authInfo');
|
||||||
if (authData) this.authLogin(authData);
|
if (authData) {
|
||||||
else this.getCode();
|
this.authLogin(authData);
|
||||||
|
} else {
|
||||||
|
this.getCode(authData => {
|
||||||
|
this.authLogin(authData, 'authOnlyLogin');
|
||||||
|
});
|
||||||
|
}
|
||||||
} else if (this.$util.isWeiXin()) {
|
} else if (this.$util.isWeiXin()) {
|
||||||
// 微信浏览器环境,显示登录页面
|
// 微信浏览器环境,显示登录页面
|
||||||
this.toLogin();
|
this.toLogin(mode);
|
||||||
} else {
|
} else {
|
||||||
// 其他浏览器环境,显示登录页面
|
// 其他浏览器环境,显示登录页面
|
||||||
this.toLogin();
|
this.toLogin(mode);
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifndef MP || H5
|
// #ifndef MP || H5
|
||||||
this.toLogin();
|
this.toLogin(mode);
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转去登录页
|
// 跳转去登录页
|
||||||
toLogin() {
|
toLogin(mode = 'navigateTo') {
|
||||||
if (this.url) this.$util.redirectTo('/pages_tool/login/login', {
|
if (this.url) this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: encodeURIComponent(this.url)
|
back: encodeURIComponent(this.url)
|
||||||
});
|
}, mode);
|
||||||
else this.$util.redirectTo('/pages_tool/login/login');
|
else this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {}, mode);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消完善信息
|
// 取消完善信息
|
||||||
@@ -535,7 +537,8 @@ export default {
|
|||||||
getPhoneNumber(e) {
|
getPhoneNumber(e) {
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
const authInfo = uni.getStorageSync('authInfo');
|
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')) {
|
if (uni.getStorageSync('source_member')) {
|
||||||
this.authMobileData.source_member = uni.getStorageSync('source_member');
|
this.authMobileData.source_member = uni.getStorageSync('source_member');
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ export default {
|
|||||||
title: '未获取到支付信息!'
|
title: '未获取到支付信息!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (this.back) this.$util.redirectTo(decodeURIComponent(this.back), {}, 'redirectTo');
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ export const lang = {
|
|||||||
Price:'价格',
|
Price:'价格',
|
||||||
Filter:'筛选',
|
Filter:'筛选',
|
||||||
Search:'请输入您要搜索的商品',
|
Search:'请输入您要搜索的商品',
|
||||||
Make:'立即询底价',
|
Make:'查看详情',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
:emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
|
:emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
|
||||||
<button type="primary" size="mini" class="button mini" v-if="!storeToken" @click="toLogin">{{
|
<button type="primary" size="mini" class="button mini" v-if="!storeToken" @click="toLogin">{{
|
||||||
$lang('toLogin')
|
$lang('toLogin')
|
||||||
}}</button>
|
}}</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|||||||
@@ -319,8 +319,9 @@ export default {
|
|||||||
@import './public/css/list.scss';
|
@import './public/css/list.scss';
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
>>>.uni-tag--primary.uni-tag--inverted {
|
.uni-tag--primary.uni-tag--inverted {
|
||||||
background-color: #f5f5f5 !important;
|
background-color: #f5f5f5 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
|
|||||||
@@ -400,7 +400,7 @@
|
|||||||
.price {
|
.price {
|
||||||
color: var(--price-color);
|
color: var(--price-color);
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
font-size: 15rpx !important;
|
font-size: 27rpx !important;
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
pages_goods/public/js/common.js
Normal file
8
pages_goods/public/js/common.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
// 跳转至登录页
|
||||||
|
toLogin() {
|
||||||
|
this.$refs.login.open();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -669,7 +669,7 @@ export default {
|
|||||||
this.getEvaluateConfig();
|
this.getEvaluateConfig();
|
||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
} else {
|
} 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
|
back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export default {
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
} else {
|
} 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
|
back: '/pages_order/detail_point?order_id=' + this.orderId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,11 +156,12 @@
|
|||||||
<ns-payment ref="choosePaymentPopup"></ns-payment>
|
<ns-payment ref="choosePaymentPopup"></ns-payment>
|
||||||
<ns-payment ref="choosePaymentMergePopup"></ns-payment>
|
<ns-payment ref="choosePaymentMergePopup"></ns-payment>
|
||||||
|
|
||||||
<ns-login ref="login"></ns-login>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<ns-login ref="login"></ns-login>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -207,7 +208,7 @@ export default {
|
|||||||
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, 'redirectTo');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
this.applyStatus();
|
this.applyStatus();
|
||||||
this.getSourceMemberInfo();
|
this.getSourceMemberInfo();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_promotion/fenxiao/apply'
|
back: '/pages_promotion/fenxiao/apply'
|
||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
this.status = res.data.status;
|
this.status = res.data.status;
|
||||||
this.isSub = false;
|
this.isSub = false;
|
||||||
if (this.status == 2) {
|
if (this.status == 2) {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.loadingCover.hide();
|
this.$refs.loadingCover.hide();
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'redirectTo');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -348,7 +348,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -367,7 +367,7 @@ export default {
|
|||||||
title: '当前分销商已冻结'
|
title: '当前分销商已冻结'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
this.getFenxiaoInfo();
|
this.getFenxiaoInfo();
|
||||||
this.getBasicsConfig();
|
this.getBasicsConfig();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_promotion/fenxiao/level'
|
back: '/pages_promotion/fenxiao/level'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: '/fenxiao/api/fenxiao/poster',
|
url: '/fenxiao/api/fenxiao/poster',
|
||||||
data: {
|
data: {
|
||||||
page: '/pages/index/index',
|
page: this.$util.INDEX_PAGE_URL,
|
||||||
qrcode_param: JSON.stringify({}),
|
qrcode_param: JSON.stringify({}),
|
||||||
template_id: id
|
template_id: id
|
||||||
},
|
},
|
||||||
@@ -154,7 +154,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -40,7 +40,7 @@ export default {
|
|||||||
|
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login', {
|
this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_promotion/fenxiao/goods_list'
|
back: '/pages_promotion/fenxiao/goods_list'
|
||||||
},
|
},
|
||||||
'redirectTo'
|
'redirectTo'
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
this.getBankAccountInfo();
|
this.getBankAccountInfo();
|
||||||
this.getWithdrawInfo();
|
this.getWithdrawInfo();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_promotion/fenxiao/withdraw_apply'
|
back: '/pages_promotion/fenxiao/withdraw_apply'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default {
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_promotion/fenxiao/withdraw_list'
|
back: '/pages_promotion/fenxiao/withdraw_list'
|
||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -544,7 +544,7 @@ export default {
|
|||||||
if (getCurrentPages().length > 1) uni.navigateBack({
|
if (getCurrentPages().length > 1) uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
else this.$util.redirectTo('/pages/index/index');
|
else this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
},
|
},
|
||||||
getNewestGame() {
|
getNewestGame() {
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'redirectTo');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export default {
|
|||||||
title: '未获取到创建订单所需数据!'
|
title: '未获取到创建订单所需数据!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
title: '未获取到创建订单所需数据!'
|
title: '未获取到创建订单所需数据!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -547,7 +547,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getOrderPaymentData();
|
this.getOrderPaymentData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
|
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
|
||||||
},
|
},
|
||||||
toIndex() {
|
toIndex() {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -99,7 +99,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
if (this.stepShow > 0) {
|
if (this.stepShow > 0) {
|
||||||
this.stepShow -= 1;
|
this.stepShow -= 1;
|
||||||
} else {
|
} 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({
|
uni.removeStorage({
|
||||||
key: 'forgot_password_token'
|
key: 'forgot_password_token'
|
||||||
});
|
});
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {}, 'redirectTo');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {}, 'redirectTo');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
this.stepShow -= 1;
|
this.stepShow -= 1;
|
||||||
|
|||||||
@@ -234,13 +234,13 @@ export default {
|
|||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: this.$lang('loginSuccessTip')
|
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);
|
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||||
} else {
|
} else {
|
||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
||||||
} else {
|
} 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.$store.dispatch('getCartNumber');
|
||||||
this.getMemberInfo(() => {
|
this.getMemberInfo(() => {
|
||||||
if (can_receive_registergift == 1) {
|
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);
|
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||||
} else {
|
} else {
|
||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
|
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, this.redirect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
this.getWithdrawInfo();
|
this.getWithdrawInfo();
|
||||||
this.getBankAccountInfo();
|
this.getBankAccountInfo();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_tool/member/apply_withdrawal'
|
back: '/pages_tool/member/apply_withdrawal'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
title: '未开启提现'
|
title: '未开启提现'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
|
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getAccountInfo();
|
this.getAccountInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'height': menuButtonBounding.height + 'px'
|
'height': menuButtonBounding.height + 'px'
|
||||||
}">
|
}">
|
||||||
<view class="navbar-wrap">
|
<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 class="navbar-title">
|
||||||
账户余额
|
账户余额
|
||||||
</view>
|
</view>
|
||||||
@@ -171,7 +171,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default {
|
|||||||
if (option.back) this.back = option.back;
|
if (option.back) this.back = option.back;
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getCancelAgreement();
|
this.getCancelAgreement();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default {
|
|||||||
|
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getStatus();
|
this.getStatus();
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
toIndex() {
|
toIndex() {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
},
|
},
|
||||||
apply() {
|
apply() {
|
||||||
this.$util.redirectTo('/pages_tool/member/cancellation');
|
this.$util.redirectTo('/pages_tool/member/cancellation');
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getStatus();
|
this.getStatus();
|
||||||
}
|
}
|
||||||
@@ -71,13 +71,13 @@
|
|||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
},
|
},
|
||||||
revoke() {
|
revoke() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
url: '/membercancel/api/membercancel/cancelApply',
|
url: '/membercancel/api/membercancel/cancelApply',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getStatus();
|
this.getStatus();
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
this.$store.commit('setToken', '');
|
this.$store.commit('setToken', '');
|
||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -220,7 +220,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,115 +1,92 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh">
|
||||||
v-if="storeToken">
|
<block class="goods_list" slot="list">
|
||||||
<view class="goods_list" slot="list">
|
<block v-if="collectionList.length > 0">
|
||||||
<block v-if="collectionList.length > 0">
|
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
||||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
@click.stop="toDetail(item)">
|
||||||
@click.stop="toDetail(item)">
|
<view class="pic">
|
||||||
<view class="pic">
|
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill"
|
||||||
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill"
|
@error="goodsImageError(index)"></image>
|
||||||
@error="goodsImageError(index)"></image>
|
</view>
|
||||||
</view>
|
<view class="goods_info">
|
||||||
<view class="goods_info">
|
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
||||||
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
<view class="goods_opection">
|
||||||
<view class="goods_opection">
|
<view class="left lineheight-clear ">
|
||||||
<view class="left lineheight-clear ">
|
<text class="symbol price-style small">¥</text>
|
||||||
<text class="symbol price-style small">¥</text>
|
<text class="price price-style large">{{
|
||||||
<text class="price price-style large">{{
|
parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
<text class="symbol price-style small">.{{
|
||||||
<text class="symbol price-style small">.{{
|
parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||||
parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
</view>
|
||||||
</view>
|
<view class="right">
|
||||||
<view class="right">
|
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
||||||
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
<view class="icon iconfont icon-icon7"></view>
|
||||||
<view class="icon iconfont icon-icon7"></view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</block>
|
||||||
</block>
|
<!-- 第一个列表为空时 -->
|
||||||
<!-- 第一个列表为空时 -->
|
<view class="collection-empty" v-else>
|
||||||
<view v-if="collectionList.length == 0 && isShowEmpty" class="empty-with-btn">
|
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品" subText="赶紧去逛逛, 关注心仪的商品吧"
|
||||||
<ns-empty text="暂无关注的商品" :isIndex="false"></ns-empty>
|
:isIndex="Boolean(storeToken)" :emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
|
||||||
<button class="go-browse-btn" @click="goToBrowse">去逛逛</button>
|
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
|
||||||
</view>
|
@click="toLogin">{{ $lang('toLogin') }}</button>
|
||||||
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
|
</view>
|
||||||
</view>
|
|
||||||
</mescroll-uni>
|
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
|
||||||
<ns-login ref="login"></ns-login>
|
</block>
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
</mescroll-uni>
|
||||||
</view>
|
<ns-login ref="login"></ns-login>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import common from './public/js/common.js';
|
||||||
import collection from './public/js/collection.js';
|
import collection from './public/js/collection.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [collection],
|
mixins: [common, collection],
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
methods: {
|
onShow() {
|
||||||
goToBrowse() {
|
if (this.storeToken) {
|
||||||
// 跳转到首页
|
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||||
uni.switchTab({
|
} else {
|
||||||
url: '/pages/index/index'
|
this.$nextTick(() => {
|
||||||
});
|
this.$refs.loadingCover.hide();
|
||||||
}
|
});
|
||||||
},
|
}
|
||||||
onShow() {
|
},
|
||||||
if (this.storeToken) {
|
watch: {
|
||||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
storeToken: function (nVal, oVal) {
|
||||||
} else {
|
if (nVal) {
|
||||||
this.$nextTick(() => {
|
this.$refs.mescroll.refresh();
|
||||||
this.$refs.login.open('/pages_tool/member/collection');
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
storeToken: function (nVal, oVal) {
|
|
||||||
if (nVal) {
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .fixed {
|
/deep/ .fixed {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .empty {
|
/deep/ .empty {
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import './public/css/collection.scss';
|
@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>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!list.length && showEmpty" class="margin-top cart-empty" :fixed="false">
|
<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>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footprint-empty" v-else>
|
<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"
|
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
|
||||||
@click="toLogin">{{ $lang('toLogin') }}</button>
|
@click="toLogin">{{ $lang('toLogin') }}</button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export default {
|
|||||||
this.$store.commit('setMemberInfo', '');
|
this.$store.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
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.commit('setMemberInfo', '');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: rres.message
|
title: rres.message
|
||||||
|
|||||||
@@ -354,7 +354,7 @@
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login', {
|
this.$util.LOGIN_PAGE_URL, {
|
||||||
back: '/pages_tool/member/modify_face'
|
back: '/pages_tool/member/modify_face'
|
||||||
},
|
},
|
||||||
'redirectTo'
|
'redirectTo'
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
if (this.memberInfo.mobile == '') {
|
if (this.memberInfo.mobile == '') {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
} else {
|
} else {
|
||||||
if (this.back) this.$util.redirectTo(this.back);
|
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(() => {
|
setTimeout(() => {
|
||||||
if (this.back) this.$util.redirectTo(this.back, {},
|
if (this.back) this.$util.redirectTo(this.back, {},
|
||||||
'redirectTo');
|
'redirectTo');
|
||||||
else this.$util.redirectTo('/pages/member/index');
|
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
this.initInfo();
|
this.initInfo();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<view class="navbar-wrap">
|
<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 class="navbar-title">
|
||||||
我的积分
|
我的积分
|
||||||
</view>
|
</view>
|
||||||
@@ -143,7 +143,7 @@ export default {
|
|||||||
if (options.from === 'navigateBack') {
|
if (options.from === 'navigateBack') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login',
|
this.$util.LOGIN_PAGE_URL,
|
||||||
{
|
{
|
||||||
back: '/pages_tool/member/point'
|
back: '/pages_tool/member/point'
|
||||||
},
|
},
|
||||||
|
|||||||
9
pages_tool/member/public/js/common.js
Normal file
9
pages_tool/member/public/js/common.js
Normal 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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -256,7 +256,7 @@ export default {
|
|||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: rres.message
|
title: rres.message
|
||||||
@@ -329,7 +329,7 @@ export default {
|
|||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
this.$store.dispatch('emptyCart');
|
this.$store.dispatch('emptyCart');
|
||||||
uni.removeStorageSync('authInfo');
|
uni.removeStorageSync('authInfo');
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
this.$refs.rulePopup.close();
|
this.$refs.rulePopup.close();
|
||||||
},
|
},
|
||||||
copyUrl() {
|
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;
|
if (this.memberInf && this.memberInfo.member_id) text += '?source_member=' + this.memberInfo.member_id;
|
||||||
this.$util.copy(text, () => {
|
this.$util.copy(text, () => {
|
||||||
this.closeSharePopup();
|
this.closeSharePopup();
|
||||||
@@ -76,7 +76,7 @@ export default {
|
|||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: "/memberrecommend/api/memberrecommend/poster",
|
url: "/memberrecommend/api/memberrecommend/poster",
|
||||||
data: {
|
data: {
|
||||||
page: '/pages/index/index',
|
page: this.$util.INDEX_PAGE_URL,
|
||||||
qrcode_param: JSON.stringify(qrcode_param)
|
qrcode_param: JSON.stringify(qrcode_param)
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
},1000);
|
||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
if (this.back != '') {
|
if (this.back != '') {
|
||||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages/member/index');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取rule
|
//获取rule
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login',
|
this.$util.LOGIN_PAGE_URL,
|
||||||
{
|
{
|
||||||
back: '/pages_tool/member/point'
|
back: '/pages_tool/member/point'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
this.getDetail();
|
this.getDetail();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo(
|
this.$util.redirectTo(
|
||||||
'/pages_tool/login/login',
|
this.$util.LOGIN_PAGE_URL,
|
||||||
{
|
{
|
||||||
back: '/pages_tool/member/point'
|
back: '/pages_tool/member/point'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
// 判断登录
|
// 判断登录
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getPackageInfo();
|
this.getPackageInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default {
|
|||||||
|
|
||||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||||
if (!this.storeToken) {
|
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
|
back: '/pages_tool/order/evaluate?order_id=' + this.orderId
|
||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getRefundData();
|
this.getRefundData();
|
||||||
} else {
|
} 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: {
|
methods: {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getRefundData();
|
this.getRefundData();
|
||||||
} else {
|
} 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: {
|
methods: {
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export default {
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getRefundDetail();
|
this.getRefundDetail();
|
||||||
} else {
|
} 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: {
|
methods: {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getRefundData();
|
this.getRefundData();
|
||||||
} else {
|
} 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
|
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$util.redirectTo('/pages_tool/login/login');
|
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
|
||||||
} else {
|
} else {
|
||||||
this.getPayInfo();
|
this.getPayInfo();
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
title: '未获取到支付信息!'
|
title: '未获取到支付信息!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
title: '未获取到支付信息!'
|
title: '未获取到支付信息!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'reLaunch');
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
goHome() {
|
goHome() {
|
||||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL, {}, 'reLaunch');
|
||||||
},
|
},
|
||||||
toOrderDetail(id) {
|
toOrderDetail(id) {
|
||||||
if (this.payInfo.order_type == 2) {
|
if (this.payInfo.order_type == 2) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
data: {},
|
data: {},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user