Compare commits
14 Commits
xindeznkf
...
custom/272
| Author | SHA1 | Date | |
|---|---|---|---|
| 40d411c57a | |||
| b079487c9a | |||
| ef7b609efb | |||
| 7a28bb7f7a | |||
| 921e8b79b1 | |||
| 0101c36012 | |||
| 469bc4da81 | |||
| 50072c45ab | |||
| c790d63005 | |||
| 71c866c0f8 | |||
| a5740f53af | |||
| 8f0a13c473 | |||
| 6d0c914e79 | |||
| 3fec0470cf |
5
App.vue
5
App.vue
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import auth from 'common/js/auth.js';
|
import auth from 'common/js/auth.js';
|
||||||
import { themeConfig } from 'common/js/config-external.js'
|
|
||||||
import configExternal from 'common/js/config-external.js'
|
import configExternal from 'common/js/config-external.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Weixin
|
Weixin
|
||||||
} from 'common/js/wx-jssdk.js';
|
} from 'common/js/wx-jssdk.js';
|
||||||
@@ -10,10 +10,8 @@
|
|||||||
mixins: [auth],
|
mixins: [auth],
|
||||||
onLaunch: function(options) {
|
onLaunch: function(options) {
|
||||||
// 方式:支持快应用,从url中query部分获取uniacid,或useragent中获取uniacid
|
// 方式:支持快应用,从url中query部分获取uniacid,或useragent中获取uniacid
|
||||||
// console.log(options.query.uniacid)
|
|
||||||
if(options.query.uniacid){
|
if(options.query.uniacid){
|
||||||
uni.setStorageSync('uniacid', options.query.uniacid);
|
uni.setStorageSync('uniacid', options.query.uniacid);
|
||||||
console.log(uni.getStorageSync('uniacid'))
|
|
||||||
}
|
}
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
|
|
||||||
@@ -64,6 +62,7 @@
|
|||||||
// 主题风格
|
// 主题风格
|
||||||
if (uni.getStorageSync('themeStyle')) {
|
if (uni.getStorageSync('themeStyle')) {
|
||||||
this.$store.commit('setThemeStyle', configExternal.loadThemeSync(uni.getStorageSync('themeStyle')));
|
this.$store.commit('setThemeStyle', configExternal.loadThemeSync(uni.getStorageSync('themeStyle')));
|
||||||
|
this.$store.dispatch('themeColorSet');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 插件是否存在
|
// 插件是否存在
|
||||||
|
|||||||
@@ -874,3 +874,5 @@ scroll-view ::-webkit-scrollbar {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@import './mp_html_patch.scss';
|
||||||
4
common/css/mp_html_patch.scss
Normal file
4
common/css/mp_html_patch.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// 修复图片垂直对齐问题,解决两张图片上下有空白缝隙问题
|
||||||
|
/deep/ ._img {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
@@ -110,7 +110,8 @@ class ConfigExternal {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 动态加载主题配置
|
// 动态加载主题配置
|
||||||
const themeData = require(`@/common/js/style_color.js`)[theme];
|
const themeData = require(`@/common/js/style_color.js`)['default'][theme];
|
||||||
|
console.log('sync themeData => ', themeData);
|
||||||
this.loadedConfigs[`theme_${theme}`] = themeData;
|
this.loadedConfigs[`theme_${theme}`] = themeData;
|
||||||
return themeData;
|
return themeData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -136,7 +137,8 @@ class ConfigExternal {
|
|||||||
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
|
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
// 动态加载主题配置
|
// 动态加载主题配置
|
||||||
const themeData = require(`@/common/js/style_color.js`)[theme];
|
const themeData = require(`@/common/js/style_color.js`)['default'][theme];
|
||||||
|
console.log('async themeData => ', themeData);
|
||||||
this.loadedConfigs[`theme_${theme}`] = themeData;
|
this.loadedConfigs[`theme_${theme}`] = themeData;
|
||||||
resolve(themeData);
|
resolve(themeData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -61,8 +61,15 @@ try {
|
|||||||
|
|
||||||
const { uniacid = 0, domain = defaultDomain } = localDevConfig ?? { uniacid: 0, domain: defaultDomain }
|
const { uniacid = 0, domain = defaultDomain } = localDevConfig ?? { uniacid: 0, domain: defaultDomain }
|
||||||
|
|
||||||
// 调试版本,配置说明
|
export default {
|
||||||
const devCfg = {
|
/**
|
||||||
|
* 1.开发调试模式
|
||||||
|
* 去掉注释 ...defaultCfg;
|
||||||
|
* 注释掉 ...releaseCfg,
|
||||||
|
* 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候,原理是:
|
||||||
|
* 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分
|
||||||
|
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
|
||||||
|
*/
|
||||||
// 商户ID
|
// 商户ID
|
||||||
uniacid: uniacid, //825
|
uniacid: uniacid, //825
|
||||||
|
|
||||||
@@ -92,31 +99,20 @@ const devCfg = {
|
|||||||
|
|
||||||
// // H5端域名
|
// // H5端域名
|
||||||
// h5Domain: 'http://saas.cn/',
|
// h5Domain: 'http://saas.cn/',
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
// 发行版本配置
|
||||||
/**
|
...(releaseCfg || {}),
|
||||||
* 1.开发调试模式
|
|
||||||
* 去掉注释 ...devCfg;
|
|
||||||
* 注释掉 ...releaseCfg,
|
|
||||||
* 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候,原理是:
|
|
||||||
* 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分
|
|
||||||
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
|
|
||||||
*/
|
|
||||||
...(releaseCfg ?? devCfg),
|
|
||||||
|
|
||||||
|
|
||||||
// 腾讯地图key
|
// 腾讯地图key
|
||||||
mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4',
|
mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4',
|
||||||
|
|
||||||
//客服地址
|
// 客服地址
|
||||||
webSocket: '{{$webSocket}}',
|
webSocket: '{{$webSocket}}',
|
||||||
|
|
||||||
//本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
|
// 本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
|
||||||
pingInterval: 1500,
|
pingInterval: 1500,
|
||||||
|
|
||||||
// 版本号
|
// 版本号
|
||||||
version: '1.0'
|
version: '1.0'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
|
||||||
@@ -1,21 +1,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 页面样式,动态设置主色调
|
|
||||||
themeColor: '' //''--base-color:#fa5d14;--base-help-color:#ff7e00;'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() { },
|
onLoad() { },
|
||||||
onShow() {
|
onShow() {
|
||||||
// 刷新多语言
|
// 刷新多语言
|
||||||
this.$langConfig.refresh();
|
this.$langConfig.refresh();
|
||||||
let time = setInterval(() => {
|
|
||||||
let theme = this.themeStyle;
|
|
||||||
if (theme && theme.main_color) {
|
|
||||||
this.themeColorSet();
|
|
||||||
clearInterval(time);
|
|
||||||
}
|
|
||||||
}, 50);
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 是否是英文环境
|
// 是否是英文环境
|
||||||
@@ -25,6 +12,9 @@ export default {
|
|||||||
themeStyle() {
|
themeStyle() {
|
||||||
return this.$store.state.themeStyle;
|
return this.$store.state.themeStyle;
|
||||||
},
|
},
|
||||||
|
themeColor() {
|
||||||
|
return this.$store.state.themeColor;
|
||||||
|
},
|
||||||
// 插件是否存在
|
// 插件是否存在
|
||||||
addonIsExist() {
|
addonIsExist() {
|
||||||
return this.$store.state.addonIsExist;
|
return this.$store.state.addonIsExist;
|
||||||
@@ -111,25 +101,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
themeColorSet() {
|
|
||||||
let theme = this.themeStyle;
|
|
||||||
this.themeColor = `--base-color:${theme.main_color};--base-help-color:${theme.aux_color};`;
|
|
||||||
if (this.tabBarHeight != '56px') this.themeColor += `--tab-bar-height:${this.tabBarHeight};`
|
|
||||||
Object.keys(theme).forEach(key => {
|
|
||||||
let data = theme[key];
|
|
||||||
if (typeof (data) == "object") {
|
|
||||||
Object.keys(data).forEach(k => {
|
|
||||||
this.themeColor += '--' + k.replace(/_/g, "-") + ':' + data[k] + ';';
|
|
||||||
});
|
|
||||||
} else if (typeof (key) == "string" && key) {
|
|
||||||
this.themeColor += '--' + key.replace(/_/g, "-") + ':' + data + ';';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
for (let i = 9; i >= 5; i--) {
|
|
||||||
let color = this.$util.colourBlend(theme.main_color, '#ffffff', (i / 10));
|
|
||||||
this.themeColor += `--base-color-light-${i}:${color};`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 颜色变浅(>0)、变深函数(<0)
|
// 颜色变浅(>0)、变深函数(<0)
|
||||||
lightenDarkenColor(color, amount) {
|
lightenDarkenColor(color, amount) {
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var method = params.data != undefined ? 'POST' : 'GET', // 请求方式
|
var method = params.data != undefined ? 'POST' : 'GET', // 请求方式
|
||||||
url = Config.baseUrl + params.url, // 请求路径
|
url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'), // 请求路径
|
||||||
data = {
|
data = {
|
||||||
app_type,
|
app_type,
|
||||||
app_type_name
|
app_type_name
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export default {
|
|||||||
//当前页面语言包(同步加载)
|
//当前页面语言包(同步加载)
|
||||||
let route = _this.route;
|
let route = _this.route;
|
||||||
let langPath = processRoutePath(route);
|
let langPath = processRoutePath(route);
|
||||||
|
// console.log(`当前页面语言包路径: ${langPath}`);
|
||||||
|
|
||||||
// 加载当前页面语言包
|
// 加载当前页面语言包
|
||||||
let currentPageLang = loadLangPackSync(locale, langPath);
|
let currentPageLang = loadLangPackSync(locale, langPath);
|
||||||
|
|||||||
@@ -149,11 +149,22 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('diy-bottom-nav verify:', { likkUrl: adaptSubpackageUrl(linkUrl), currentPageRoute: currentPageRoute});
|
||||||
|
|
||||||
// 精确匹配当前路径
|
// 精确匹配当前路径
|
||||||
if (adaptSubpackageUrl(linkUrl) === currentPageRoute) {
|
if (adaptSubpackageUrl(linkUrl) === currentPageRoute) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 同属于一个子包的路径,也认为是匹配的
|
||||||
|
try {
|
||||||
|
if (adaptSubpackageUrl(linkUrl).split('/')[1] === currentPageRoute.split('/')[1]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('diy-bottom-nav verify error:', error);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
|
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询价' }}</text>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag"
|
<view class="member-price-tag"
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
|
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询价' }}</text>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -610,10 +610,10 @@ export default {
|
|||||||
view {
|
view {
|
||||||
color: #222222;
|
color: #222222;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: break-word;
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.border-top {
|
&.border-top {
|
||||||
@@ -630,6 +630,7 @@ export default {
|
|||||||
view {
|
view {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-size: $font-size-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
|
|||||||
32
docs/H5_ROUTER_FIX_README.md
Normal file
32
docs/H5_ROUTER_FIX_README.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# H5路由模式修复说明
|
||||||
|
|
||||||
|
## 问题描述
|
||||||
|
生产环境下,导航到子页面(如 `/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`)后刷新页面,会导致页面空白,显示 `<html><head></head><body></body></html>`。
|
||||||
|
|
||||||
|
## 根本原因
|
||||||
|
1. 应用使用了H5的`history`路由模式
|
||||||
|
2. 生产服务器没有配置路由回退机制
|
||||||
|
3. 刷新时,浏览器直接向服务器请求完整URL路径,服务器无法找到对应的资源,返回空HTML
|
||||||
|
|
||||||
|
## 解决方案
|
||||||
|
将H5路由模式从`history`改为`hash`模式。Hash模式下,所有路由请求都会指向应用根路径,避免服务器配置问题。
|
||||||
|
|
||||||
|
## 修改内容
|
||||||
|
修改 `manifest.json` 文件中的H5路由配置:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "hash", // 从 "history" 改为 "hash"
|
||||||
|
"base": "/hwappx/test/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 预期效果
|
||||||
|
- 子页面刷新后不再空白
|
||||||
|
- URL格式变为 `http://domain/hwappx/test/#/pages_tool/form/formdata?id=73&uniacid=2793`
|
||||||
|
- 无需修改服务器配置
|
||||||
|
|
||||||
|
## 构建部署
|
||||||
|
修改后,需要重新构建H5版本并部署到生产环境。可以通过HBuilderX或其他uni-app构建工具进行构建。
|
||||||
756
docs/HISTORY_MODE_SUB_DIR_DEPLOY.md
Normal file
756
docs/HISTORY_MODE_SUB_DIR_DEPLOY.md
Normal file
@@ -0,0 +1,756 @@
|
|||||||
|
# H5 History模式子目录部署配置指南
|
||||||
|
|
||||||
|
## 场景说明
|
||||||
|
您的uni-app H5应用部署在现有网站的子目录 `/hwappx/test/` 下,需要使用`history`路由模式,并解决刷新页面空白的问题。
|
||||||
|
|
||||||
|
## 配置步骤
|
||||||
|
|
||||||
|
### 1. 应用配置(已完成)
|
||||||
|
确保`manifest.json`中的H5路由配置正确设置了`base`路径:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwappx/test/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 服务器配置
|
||||||
|
服务器需要配置路由回退,将所有指向`/hwappx/test/`下不存在文件的请求重定向到`/hwappx/test/index.html`。
|
||||||
|
|
||||||
|
#### 2.1 Nginx配置
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name yourdomain.com;
|
||||||
|
|
||||||
|
# 主网站根目录
|
||||||
|
root /path/to/main/website;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# 静态文件直接返回
|
||||||
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
}
|
||||||
|
|
||||||
|
# H5应用子目录的路由回退配置
|
||||||
|
location /hwappx/test/ {
|
||||||
|
# 确保静态文件能被正确访问
|
||||||
|
try_files $uri $uri/ /hwappx/test/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 主网站的其他配置
|
||||||
|
location / {
|
||||||
|
# 主网站的原有配置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.2 Apache配置
|
||||||
|
|
||||||
|
##### .htaccess文件配置(放在`/hwappx/test/`目录下)
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 虚拟主机配置
|
||||||
|
```apache
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName yourdomain.com
|
||||||
|
DocumentRoot /path/to/main/website
|
||||||
|
|
||||||
|
# H5应用子目录配置
|
||||||
|
<Directory /path/to/main/website/hwappx/test>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# 主网站目录配置
|
||||||
|
<Directory /path/to/main/website>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.3 IIS配置
|
||||||
|
在`/hwappx/test/`目录下创建`web.config`文件:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="History Mode Sub Directory">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/test/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
<staticContent>
|
||||||
|
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||||
|
</staticContent>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.4 Express.js配置
|
||||||
|
```javascript
|
||||||
|
const express = require('express');
|
||||||
|
const path = require('path');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
// 主网站静态文件
|
||||||
|
app.use(express.static(path.join(__dirname, 'main-website')));
|
||||||
|
|
||||||
|
// H5应用静态文件和路由回退
|
||||||
|
app.use('/hwappx/test', express.static(path.join(__dirname, 'h5-app')));
|
||||||
|
|
||||||
|
app.get('/hwappx/test/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'h5-app', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000, () => {
|
||||||
|
console.log('Server is running on port 3000');
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## 配置关键点
|
||||||
|
|
||||||
|
1. **base路径一致性**:
|
||||||
|
- `manifest.json`中的`base`配置必须与部署路径一致:`/hwappx/test/`
|
||||||
|
- 服务器配置中的重定向路径必须包含完整的base路径
|
||||||
|
|
||||||
|
2. **静态资源处理**:
|
||||||
|
- 确保CSS、JS、图片等静态资源能够被正确访问
|
||||||
|
- 静态资源的URL应该自动包含base路径
|
||||||
|
|
||||||
|
3. **路由回退规则**:
|
||||||
|
- 规则必须限定在`/hwappx/test/`路径下
|
||||||
|
- 只重定向不存在的文件和目录请求
|
||||||
|
|
||||||
|
## 验证方法
|
||||||
|
|
||||||
|
1. 构建H5应用并部署到服务器的`/hwappx/test/`目录
|
||||||
|
2. 访问应用首页:`http://yourdomain.com/hwappx/test/`
|
||||||
|
3. 导航到子页面:`http://yourdomain.com/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`
|
||||||
|
4. 刷新页面,验证页面是否正常显示
|
||||||
|
|
||||||
|
## 常见问题排查
|
||||||
|
|
||||||
|
1. **404错误**:
|
||||||
|
- 检查服务器配置中的重定向路径是否正确
|
||||||
|
- 确保`base`路径配置一致
|
||||||
|
|
||||||
|
2. **页面样式缺失**:
|
||||||
|
- 检查静态资源URL是否包含了正确的base路径
|
||||||
|
- 确认CSS文件路径是否正确
|
||||||
|
|
||||||
|
3. **路由无法跳转**:
|
||||||
|
- 检查`manifest.json`中的路由配置
|
||||||
|
- 确认服务器重定向规则是否生效
|
||||||
|
|
||||||
|
## 部署注意事项
|
||||||
|
|
||||||
|
1. 配置完成后需要重启服务器
|
||||||
|
2. 对于HTTPS站点,需要在对应的HTTPS配置中添加相同的规则
|
||||||
|
3. 如果使用CDN,需要确保CDN也配置了相应的路由回退规则
|
||||||
|
4. 定期检查服务器日志,确保配置正常工作
|
||||||
|
|
||||||
|
## 总结
|
||||||
|
通过正确配置应用的`base`路径和服务器的路由回退规则,您的uni-app H5应用可以在子目录`/hwappx/test/`下成功使用`history`路由模式,并且解决刷新页面空白的问题。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 多子目录部署支持
|
||||||
|
|
||||||
|
### 场景说明
|
||||||
|
如果您需要在同一服务器上部署多个使用`history`模式的uni-app H5应用,例如:
|
||||||
|
- `/hwapp/`
|
||||||
|
- `/hwappx/test/`
|
||||||
|
- `/hwappx/comoon/`
|
||||||
|
- `/hwappx/1000/`
|
||||||
|
|
||||||
|
您可以按照以下配置方法实现多子目录部署。
|
||||||
|
|
||||||
|
### 1. 每个应用的manifest.json配置
|
||||||
|
每个应用都需要在`manifest.json`中配置正确的`base`路径:
|
||||||
|
|
||||||
|
#### 应用1:部署到 `/hwapp/`
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwapp/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 应用2:部署到 `/hwappx/test/`
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwappx/test/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 应用3:部署到 `/hwappx/comoon/`
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwappx/comoon/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 应用4:部署到 `/hwappx/1000/`
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwappx/1000/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 服务器多子目录配置
|
||||||
|
|
||||||
|
#### 2.1 Nginx配置
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name yourdomain.com;
|
||||||
|
root /path/to/main/website;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# 静态文件缓存设置
|
||||||
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
}
|
||||||
|
|
||||||
|
# 应用1: /hwapp/
|
||||||
|
location /hwapp/ {
|
||||||
|
try_files $uri $uri/ /hwapp/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 应用2: /hwappx/test/
|
||||||
|
location /hwappx/test/ {
|
||||||
|
try_files $uri $uri/ /hwappx/test/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 应用3: /hwappx/comoon/
|
||||||
|
location /hwappx/comoon/ {
|
||||||
|
try_files $uri $uri/ /hwappx/comoon/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 应用4: /hwappx/1000/
|
||||||
|
location /hwappx/1000/ {
|
||||||
|
try_files $uri $uri/ /hwappx/1000/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 主网站其他配置
|
||||||
|
location / {
|
||||||
|
# 原有主网站配置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.2 Apache配置
|
||||||
|
|
||||||
|
##### 方法1:在每个子目录下创建.htaccess文件
|
||||||
|
|
||||||
|
在`/hwapp/`目录下创建.htaccess:
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwapp/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwapp/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
在`/hwappx/test/`目录下创建.htaccess:
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
在`/hwappx/comoon/`目录下创建.htaccess:
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/comoon/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/comoon/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
在`/hwappx/1000/`目录下创建.htaccess:
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/1000/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/1000/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 方法2:在主配置文件中统一配置
|
||||||
|
```apache
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName yourdomain.com
|
||||||
|
DocumentRoot /path/to/main/website
|
||||||
|
|
||||||
|
# 应用1: /hwapp/
|
||||||
|
<Directory /path/to/main/website/hwapp>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwapp/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwapp/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# 应用2: /hwappx/test/
|
||||||
|
<Directory /path/to/main/website/hwappx/test>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# 应用3: /hwappx/comoon/
|
||||||
|
<Directory /path/to/main/website/hwappx/comoon>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/comoon/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/comoon/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# 应用4: /hwappx/1000/
|
||||||
|
<Directory /path/to/main/website/hwappx/1000>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/1000/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/1000/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# 主网站目录配置
|
||||||
|
<Directory /path/to/main/website>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.3 IIS配置
|
||||||
|
|
||||||
|
在每个子目录下创建`web.config`文件:
|
||||||
|
|
||||||
|
##### 应用1:/hwapp/web.config
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="History Mode hwapp">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwapp/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 应用2:/hwappx/test/web.config
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="History Mode hwappx/test">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/test/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 应用3:/hwappx/comoon/web.config
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="History Mode hwappx/comoon">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/comoon/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 应用4:/hwappx/1000/web.config
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="History Mode hwappx/1000">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/1000/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.4 Express.js配置
|
||||||
|
```javascript
|
||||||
|
const express = require('express');
|
||||||
|
const path = require('path');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
// 主网站静态文件
|
||||||
|
app.use(express.static(path.join(__dirname, 'main-website')));
|
||||||
|
|
||||||
|
// 应用1: /hwapp/
|
||||||
|
app.use('/hwapp', express.static(path.join(__dirname, 'h5-app1')));
|
||||||
|
app.get('/hwapp/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'h5-app1', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 应用2: /hwappx/test/
|
||||||
|
app.use('/hwappx/test', express.static(path.join(__dirname, 'h5-app2')));
|
||||||
|
app.get('/hwappx/test/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'h5-app2', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 应用3: /hwappx/comoon/
|
||||||
|
app.use('/hwappx/comoon', express.static(path.join(__dirname, 'h5-app3')));
|
||||||
|
app.get('/hwappx/comoon/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'h5-app3', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 应用4: /hwappx/1000/
|
||||||
|
app.use('/hwappx/1000', express.static(path.join(__dirname, 'h5-app4')));
|
||||||
|
app.get('/hwappx/1000/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'h5-app4', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000, () => {
|
||||||
|
console.log('Server is running on port 3000');
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. 多子目录部署验证
|
||||||
|
|
||||||
|
对于每个应用,执行以下验证步骤:
|
||||||
|
|
||||||
|
1. 构建应用并部署到对应的子目录
|
||||||
|
2. 访问应用首页,例如:`http://yourdomain.com/hwappx/test/`
|
||||||
|
3. 导航到子页面,例如:`http://yourdomain.com/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`
|
||||||
|
4. 刷新页面,验证页面是否正常显示
|
||||||
|
5. 直接访问子页面URL,验证是否能正常加载
|
||||||
|
|
||||||
|
### 4. 多子目录部署注意事项
|
||||||
|
|
||||||
|
1. **路径隔离**:每个应用必须部署在独立的子目录下,避免文件和路由冲突
|
||||||
|
2. **base一致性**:每个应用的`manifest.json`中的`base`配置必须与部署路径完全一致
|
||||||
|
3. **服务器规则**:每个子目录都需要独立的路由回退规则
|
||||||
|
4. **静态资源**:确保每个应用的静态资源URL包含了正确的base路径
|
||||||
|
5. **缓存设置**:可以为不同应用设置不同的缓存策略
|
||||||
|
6. **日志分离**:建议为不同应用配置独立的访问日志,便于问题排查
|
||||||
|
|
||||||
|
### 5. 常见问题排查
|
||||||
|
|
||||||
|
1. **应用间冲突**:
|
||||||
|
- 确保每个应用使用独立的子目录
|
||||||
|
- 检查`base`路径配置是否唯一
|
||||||
|
|
||||||
|
2. **路由混乱**:
|
||||||
|
- 验证服务器配置中的重定向路径是否正确
|
||||||
|
- 检查应用的路由配置是否与其他应用冲突
|
||||||
|
|
||||||
|
3. **静态资源404**:
|
||||||
|
- 确认静态资源URL是否包含了正确的base路径
|
||||||
|
- 检查服务器配置是否正确处理了静态资源请求
|
||||||
|
|
||||||
|
4. **配置不生效**:
|
||||||
|
- 配置完成后重启服务器
|
||||||
|
- 清除浏览器缓存后重试
|
||||||
|
|
||||||
|
通过以上配置,您可以在同一服务器上成功部署多个使用`history`模式的uni-app H5应用,每个应用都能独立运行并支持刷新操作。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 通配符配置方案
|
||||||
|
|
||||||
|
### 场景说明
|
||||||
|
如果您的子目录有明确的命名规则(如您的`/hwapp/`、`/hwappx/test/`、`/hwappx/comoon/`、`/hwappx/1000/`等),可以使用通配符配置来简化服务器设置,避免为每个子目录手动添加配置。
|
||||||
|
|
||||||
|
### 子目录规则分析
|
||||||
|
根据您的子目录结构,可以分为两类:
|
||||||
|
1. 一级子目录:`/hwapp/`
|
||||||
|
2. `/hwappx/`下的所有二级子目录:`/hwappx/*/`
|
||||||
|
|
||||||
|
### 服务器通配符配置
|
||||||
|
|
||||||
|
#### 1. Nginx配置
|
||||||
|
使用正则表达式location来匹配子目录模式:
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name yourdomain.com;
|
||||||
|
root /path/to/main/website;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# 静态文件缓存设置
|
||||||
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
}
|
||||||
|
|
||||||
|
# 匹配 /hwapp/ 一级子目录
|
||||||
|
location = /hwapp/ {
|
||||||
|
try_files $uri $uri/ /hwapp/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/hwapp/(.*)$ {
|
||||||
|
try_files $uri $uri/ /hwapp/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 匹配 /hwappx/ 下的所有二级子目录,如 /hwappx/test/、/hwappx/comoon/、/hwappx/1000/ 等
|
||||||
|
location ~ ^/hwappx/([^/]+)/(.*)$ {
|
||||||
|
# 提取子目录名,重定向到对应目录的index.html
|
||||||
|
try_files $uri $uri/ /hwappx/$1/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 主网站其他配置
|
||||||
|
location / {
|
||||||
|
# 原有主网站配置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. Apache配置
|
||||||
|
|
||||||
|
##### 方法1:使用RewriteRule的正则表达式
|
||||||
|
|
||||||
|
在主网站根目录的`.htaccess`文件中添加:
|
||||||
|
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# 匹配 /hwapp/ 一级子目录
|
||||||
|
RewriteRule ^hwapp/(.*)$ /hwapp/index.html [L]
|
||||||
|
|
||||||
|
# 匹配 /hwappx/ 下的所有二级子目录
|
||||||
|
RewriteRule ^hwappx/([^/]+)/(.*)$ /hwappx/$1/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 方法2:在虚拟主机配置中使用
|
||||||
|
|
||||||
|
```apache
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName yourdomain.com
|
||||||
|
DocumentRoot /path/to/main/website
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# 匹配 /hwapp/ 一级子目录
|
||||||
|
RewriteRule ^/hwapp/(.*)$ /hwapp/index.html [L]
|
||||||
|
|
||||||
|
# 匹配 /hwappx/ 下的所有二级子目录
|
||||||
|
RewriteRule ^/hwappx/([^/]+)/(.*)$ /hwappx/$1/index.html [L]
|
||||||
|
|
||||||
|
# 主网站目录配置
|
||||||
|
<Directory /path/to/main/website>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. IIS配置
|
||||||
|
|
||||||
|
在主网站根目录的`web.config`文件中添加:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<!-- 匹配 /hwapp/ 一级子目录 -->
|
||||||
|
<rule name="History Mode hwapp Wildcard" stopProcessing="true">
|
||||||
|
<match url="^hwapp/.*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwapp/index.html" />
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- 匹配 /hwappx/ 下的所有二级子目录 -->
|
||||||
|
<rule name="History Mode hwappx Wildcard" stopProcessing="true">
|
||||||
|
<match url="^hwappx/([^/]+)/.*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/{R:1}/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 4. Express.js配置
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const express = require('express');
|
||||||
|
const path = require('path');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
// 主网站静态文件
|
||||||
|
app.use(express.static(path.join(__dirname, 'main-website')));
|
||||||
|
|
||||||
|
// 匹配 /hwapp/ 一级子目录
|
||||||
|
app.use('/hwapp', express.static(path.join(__dirname, 'hwapp')));
|
||||||
|
app.get('/hwapp/*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'hwapp', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 匹配 /hwappx/ 下的所有二级子目录
|
||||||
|
// 使用路由参数来捕获子目录名
|
||||||
|
app.get('/hwappx/:subdir/*', (req, res) => {
|
||||||
|
const subdir = req.params.subdir;
|
||||||
|
const appPath = path.join(__dirname, `hwappx/${subdir}`);
|
||||||
|
|
||||||
|
// 检查应用目录是否存在
|
||||||
|
const fs = require('fs');
|
||||||
|
if (fs.existsSync(appPath)) {
|
||||||
|
res.sendFile(path.join(appPath, 'index.html'));
|
||||||
|
} else {
|
||||||
|
res.status(404).send('Application not found');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 为 /hwappx/ 下的每个子目录提供静态文件服务
|
||||||
|
app.use('/hwappx', express.static(path.join(__dirname, 'hwappx')));
|
||||||
|
|
||||||
|
app.listen(3000, () => {
|
||||||
|
console.log('Server is running on port 3000');
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### 通配符配置优势
|
||||||
|
|
||||||
|
1. **减少配置量**:无需为每个新子目录手动添加配置
|
||||||
|
2. **自动适应**:新添加的符合规则的子目录会自动应用路由回退
|
||||||
|
3. **统一管理**:所有同类应用的配置集中管理,便于维护
|
||||||
|
4. **规则灵活**:可以根据实际需要调整正则表达式匹配规则
|
||||||
|
|
||||||
|
### 通配符配置注意事项
|
||||||
|
|
||||||
|
1. **规则顺序**:确保更具体的规则优先于通配符规则
|
||||||
|
2. **性能考虑**:过于复杂的正则表达式可能影响服务器性能
|
||||||
|
3. **目录验证**:在Express.js等代码级配置中,建议添加目录存在性检查
|
||||||
|
4. **冲突避免**:确保通配符规则不会与主网站或其他应用的路由冲突
|
||||||
|
5. **测试充分**:配置后要充分测试各种子目录的访问情况
|
||||||
|
|
||||||
|
### 验证方法
|
||||||
|
|
||||||
|
1. 部署一个符合规则的新子目录应用,如 `/hwappx/newapp/`
|
||||||
|
2. 访问应用首页:`http://yourdomain.com/hwappx/newapp/`
|
||||||
|
3. 导航到子页面并刷新,验证是否正常显示
|
||||||
|
4. 直接访问子页面URL,验证是否能正常加载
|
||||||
|
|
||||||
|
通过以上通配符配置,您可以轻松管理大量符合规则的子目录应用,避免重复配置工作。
|
||||||
140
docs/SERVER_ROUTER_FALLBACK_CONFIG.md
Normal file
140
docs/SERVER_ROUTER_FALLBACK_CONFIG.md
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# H5 History模式服务器路由回退配置指南
|
||||||
|
|
||||||
|
## 配置原理
|
||||||
|
当使用H5的`history`路由模式时,所有直接访问的URL(如刷新页面)都会发送到服务器。服务器需要配置路由回退,将所有匹配不到实际文件的请求重定向到应用的`index.html`,让客户端路由处理URL。
|
||||||
|
|
||||||
|
## 服务器配置示例
|
||||||
|
|
||||||
|
### 1. Nginx配置
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name yourdomain.com;
|
||||||
|
|
||||||
|
root /path/to/your/h5/dist;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# 静态文件直接返回
|
||||||
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
}
|
||||||
|
|
||||||
|
# 所有其他请求重定向到index.html
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /hwappx/test/index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Apache配置
|
||||||
|
需要确保启用了`mod_rewrite`模块
|
||||||
|
|
||||||
|
#### .htaccess文件配置
|
||||||
|
```apache
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 虚拟主机配置
|
||||||
|
```apache
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName yourdomain.com
|
||||||
|
DocumentRoot /path/to/your/h5/dist
|
||||||
|
|
||||||
|
<Directory /path/to/your/h5/dist>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /hwappx/test/
|
||||||
|
RewriteRule ^index\.html$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /hwappx/test/index.html [L]
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Express.js配置
|
||||||
|
```javascript
|
||||||
|
const express = require('express');
|
||||||
|
const path = require('path');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
// 静态文件服务
|
||||||
|
app.use('/hwappx/test/', express.static(path.join(__dirname, 'dist')));
|
||||||
|
|
||||||
|
// 路由回退
|
||||||
|
app.get('*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000, () => {
|
||||||
|
console.log('Server is running on port 3000');
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. IIS配置
|
||||||
|
需要安装URL重写模块(URL Rewrite Module)
|
||||||
|
|
||||||
|
#### web.config文件配置
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
|
||||||
|
<match url=".*" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/hwappx/test/index.html" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
<staticContent>
|
||||||
|
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
|
||||||
|
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||||
|
</staticContent>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 配置要点
|
||||||
|
|
||||||
|
1. **base路径设置**:确保服务器配置中的路径与`manifest.json`中的`base`配置一致
|
||||||
|
```json
|
||||||
|
"h5": {
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": "/hwappx/test/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **静态资源处理**:确保图片、CSS、JS等静态文件能够被正确访问
|
||||||
|
|
||||||
|
3. **缓存策略**:为静态文件设置合理的缓存过期时间
|
||||||
|
|
||||||
|
## 验证配置
|
||||||
|
|
||||||
|
1. 部署配置后的应用到服务器
|
||||||
|
2. 访问应用首页
|
||||||
|
3. 导航到子页面(如`/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`)
|
||||||
|
4. 刷新页面,验证页面是否正常显示
|
||||||
|
|
||||||
|
## 注意事项
|
||||||
|
|
||||||
|
- 配置完成后需要重启服务器生效
|
||||||
|
- 确保服务器有权限读取配置文件
|
||||||
|
- 对于HTTPS站点,需要在对应的HTTPS配置中添加相同的路由回退规则
|
||||||
|
- 如果使用CDN,需要确保CDN也配置了相应的路由回退规则
|
||||||
1
lang/zh-cn/agreement/contenr.js
Normal file
1
lang/zh-cn/agreement/contenr.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const lang = {}
|
||||||
@@ -2,5 +2,6 @@ export const lang = {
|
|||||||
//title为每个页面的标题
|
//title为每个页面的标题
|
||||||
title: '商品分类',
|
title: '商品分类',
|
||||||
search:'商品搜索',
|
search:'商品搜索',
|
||||||
seeMore : '查看更多'
|
seeMore : '查看更多',
|
||||||
|
Make: "询价"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ export const lang = {
|
|||||||
//title为每个页面的标题
|
//title为每个页面的标题
|
||||||
title: '',
|
title: '',
|
||||||
select: '选择',
|
select: '选择',
|
||||||
details:'商品详情',
|
details:'资源详情',
|
||||||
params: '参数',
|
params: '参数',
|
||||||
service: '商品服务',
|
service: '商品服务',
|
||||||
allGoods: '全部商品',
|
allGoods: '全部商品',
|
||||||
@@ -11,7 +11,7 @@ export const lang = {
|
|||||||
home:'首页',
|
home:'首页',
|
||||||
cart:'购物车',
|
cart:'购物车',
|
||||||
leave:'立即留言',
|
leave:'立即留言',
|
||||||
make:'立即咨询',
|
make:'电话询价',
|
||||||
|
|
||||||
send:'配送',
|
send:'配送',
|
||||||
express:'快递发货',
|
express:'快递发货',
|
||||||
@@ -22,7 +22,7 @@ export const lang = {
|
|||||||
status:'该商品已下架',
|
status:'该商品已下架',
|
||||||
sellout:'库存不足',
|
sellout:'库存不足',
|
||||||
max:'已达最大限购数量',
|
max:'已达最大限购数量',
|
||||||
makebtn:'咨询',
|
makebtn:'询价',
|
||||||
sales:'销量',
|
sales:'销量',
|
||||||
stock:'库存',
|
stock:'库存',
|
||||||
kefu:'客服',
|
kefu:'客服',
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ export const lang = {
|
|||||||
Price:'价格',
|
Price:'价格',
|
||||||
Filter:'筛选',
|
Filter:'筛选',
|
||||||
Search:'请输入您要搜索的商品',
|
Search:'请输入您要搜索的商品',
|
||||||
Make:'咨询',
|
Make:'立即询价',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ export const lang = {
|
|||||||
readyDelivery: '待发货',
|
readyDelivery: '待发货',
|
||||||
waitDelivery: '待收货',
|
waitDelivery: '待收货',
|
||||||
refunding: '退款',
|
refunding: '退款',
|
||||||
|
getDynacode: '获取动态验证码',
|
||||||
|
|
||||||
|
|
||||||
// 会员中心入口
|
// 会员中心入口
|
||||||
sign: '签到',
|
sign: '签到',
|
||||||
personInfo: '个人资料',
|
personInfo: '个人资料',
|
||||||
|
|||||||
@@ -100,9 +100,9 @@
|
|||||||
},
|
},
|
||||||
"router" : {
|
"router" : {
|
||||||
"mode" : "history",
|
"mode" : "history",
|
||||||
"base" : "/hwapp/"
|
"base" : "/hwappx/2724/"
|
||||||
},
|
},
|
||||||
"title" : " ",
|
"title" : "",
|
||||||
"devServer" : {
|
"devServer" : {
|
||||||
"https" : false
|
"https" : false
|
||||||
},
|
},
|
||||||
|
|||||||
10
pages.json
10
pages.json
@@ -43,7 +43,7 @@
|
|||||||
{
|
{
|
||||||
"path": "detail",
|
"path": "detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品详情"
|
"navigationBarTitleText": "资源详情"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -855,6 +855,14 @@
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "form/formdata",
|
||||||
|
"style": {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "weapp/order_shipping",
|
"path": "weapp/order_shipping",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="empty" :style="themeColor">
|
||||||
<view class="empty">
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +1,68 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
|
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
|
||||||
<view class="site-info-box"
|
class="page-img">
|
||||||
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
|
<view class="site-info-box"
|
||||||
<view class="site-info">
|
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
|
||||||
<view class="img-box" v-if="siteInfo.logo_square">
|
<view class="site-info">
|
||||||
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
|
<view class="img-box" v-if="siteInfo.logo_square">
|
||||||
</view>
|
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
|
||||||
<view class="info-box" :style="{ color: '#ffffff' }">
|
</view>
|
||||||
<text class="font-size-base">{{ siteInfo.site_name }}</text>
|
<view class="info-box" :style="{ color: '#ffffff' }">
|
||||||
<text>{{ followOfficialAccount.welcomeMsg }}</text>
|
<text class="font-size-base">{{ siteInfo.site_name }}</text>
|
||||||
|
<text>{{ followOfficialAccount.welcomeMsg }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
|
||||||
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号' }}</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
||||||
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
|
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
||||||
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
||||||
<template v-slot:components>
|
<template v-slot:components>
|
||||||
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
|
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
|
||||||
|
</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
|
</template>
|
||||||
|
</diy-index-page>
|
||||||
|
|
||||||
|
<view v-else class="bg-index"
|
||||||
|
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
|
:followOfficialAccount="followOfficialAccount" />
|
||||||
</template>
|
|
||||||
<template v-slot:default>
|
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
</template>
|
</view>
|
||||||
</diy-index-page>
|
|
||||||
|
|
||||||
<view v-else class="bg-index"
|
<template v-if="adv.advshow != -1">
|
||||||
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
<view @touchmove.prevent.stop>
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
||||||
:followOfficialAccount="followOfficialAccount" />
|
<view class="small-bot">
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
|
||||||
</view>
|
|
||||||
|
|
||||||
<template v-if="adv.advshow != -1">
|
|
||||||
<view @touchmove.prevent.stop>
|
|
||||||
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
|
||||||
<view class="small-bot">
|
|
||||||
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
|
|
||||||
<view bindtap="adverclose">跳过</view>
|
<view bindtap="adverclose">跳过</view>
|
||||||
<view class="time">{{clock}}s</view>
|
<view class="time">{{clock}}s</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
|
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
|
||||||
<view class="time" style="line-height: 64rpx;">{{clock}}s</view>
|
<view class="time" style="line-height: 64rpx;">{{clock}}s</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
||||||
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
||||||
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
||||||
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
||||||
:src="$util.img(item.imageUrl)" width="100%"></image>
|
:src="$util.img(item.imageUrl)" width="100%"></image>
|
||||||
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
|
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
|
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
|
||||||
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<!-- <view class="image-wrap">
|
||||||
<!-- <view class="image-wrap">
|
|
||||||
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
|
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
|
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
@@ -70,76 +72,78 @@
|
|||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> -->
|
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> -->
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 底部tabBar -->
|
||||||
|
<view class="page-bottom" v-if="openBottomNav">
|
||||||
|
<diy-bottom-nav @callback="callback" :name="name" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 关注公众号弹窗 -->
|
||||||
|
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
|
||||||
|
<uni-popup ref="officialAccountsPopup" type="center">
|
||||||
|
<view class="official-accounts-wrap">
|
||||||
|
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
|
||||||
|
<text class="desc">关注了解更多</text>
|
||||||
|
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
|
||||||
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 底部tabBar -->
|
<!-- 收藏 -->
|
||||||
<view class="page-bottom" v-if="openBottomNav">
|
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
||||||
<diy-bottom-nav @callback="callback" :name="name" />
|
<view v-if="showTip" class="collectPopupWindow"
|
||||||
</view>
|
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
||||||
|
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
||||||
<!-- 关注公众号弹窗 -->
|
<text @click="closeCollectPopupWindow">我知道了</text>
|
||||||
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
|
|
||||||
<uni-popup ref="officialAccountsPopup" type="center">
|
|
||||||
<view class="official-accounts-wrap">
|
|
||||||
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
|
|
||||||
<text class="desc">关注了解更多</text>
|
|
||||||
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 收藏 -->
|
<!-- 选择门店弹出框,定位当前位置,展示最近的一个门店 -->
|
||||||
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
<view @touchmove.prevent.stop class="choose-store">
|
||||||
<view v-if="showTip" class="collectPopupWindow"
|
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
||||||
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
<view class="choose-store-popup">
|
||||||
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
<view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
|
||||||
<text @click="closeCollectPopupWindow">我知道了</text>
|
<view class="position-wrap">
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
<!-- 选择门店弹出框,定位当前位置,展示最近的一个门店 -->
|
|
||||||
<view @touchmove.prevent.stop class="choose-store">
|
|
||||||
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
|
||||||
<view class="choose-store-popup">
|
|
||||||
<view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
|
|
||||||
<view class="position-wrap">
|
|
||||||
<text class="iconfont icon-dizhi"></text>
|
|
||||||
<text class="address">{{ currentPosition }}</text>
|
|
||||||
<view class="reposition" @click="reposition"
|
|
||||||
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
|
||||||
<text class="iconfont icon-dingwei"></text>
|
|
||||||
<text>重新定位</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="store-wrap" v-if="nearestStore">
|
|
||||||
<text class="tag">当前门店</text>
|
|
||||||
<view class="store-name">{{ nearestStore.store_name }}</view>
|
|
||||||
<view class="address">{{ nearestStore.show_address }}</view>
|
|
||||||
<view class="distance" v-if="nearestStore.distance">
|
|
||||||
<text class="iconfont icon-dizhi"></text>
|
<text class="iconfont icon-dizhi"></text>
|
||||||
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' : nearestStore.distance *
|
<text class="address">{{ currentPosition }}</text>
|
||||||
1000 +
|
<view class="reposition" @click="reposition"
|
||||||
'm' }}</text>
|
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
||||||
|
<text class="iconfont icon-dingwei"></text>
|
||||||
|
<text>重新定位</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="store-wrap" v-if="nearestStore">
|
||||||
|
<text class="tag">当前门店</text>
|
||||||
|
<view class="store-name">{{ nearestStore.store_name }}</view>
|
||||||
|
<view class="address">{{ nearestStore.show_address }}</view>
|
||||||
|
<view class="distance" v-if="nearestStore.distance">
|
||||||
|
<text class="iconfont icon-dizhi"></text>
|
||||||
|
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' :
|
||||||
|
nearestStore.distance *
|
||||||
|
1000 +
|
||||||
|
'm' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button type="primary" @click="enterStore">确认进入</button>
|
||||||
|
<view class="other-store" @click="chooseOtherStore"
|
||||||
|
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
||||||
|
<text>选择其他门店</text>
|
||||||
|
<text class="iconfont icon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button type="primary" @click="enterStore">确认进入</button>
|
</uni-popup>
|
||||||
<view class="other-store" @click="chooseOtherStore"
|
</view>
|
||||||
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
<hover-nav></hover-nav>
|
||||||
<text>选择其他门店</text>
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<text class="iconfont icon-right"></text>
|
<!-- 小程序隐私协议 -->
|
||||||
</view>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
</uni-popup>
|
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||||
|
<ns-login ref="login"></ns-login>
|
||||||
</view>
|
</view>
|
||||||
<hover-nav></hover-nav>
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
|
||||||
<ns-login ref="login"></ns-login>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
|
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
|
||||||
<block v-if="hasData">
|
<block v-if="hasData">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<block v-if="diyData">
|
<block v-if="diyData">
|
||||||
<block v-for="(item, index) in diyData.value" :key="index">
|
<block v-for="(item, index) in diyData.value" :key="index">
|
||||||
<view v-if="item.componentName == 'GoodsCategory'">
|
<view v-if="item.componentName == 'GoodsCategory'">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<!-- #ifndef H5 -->
|
<!-- #ifndef H5 -->
|
||||||
<!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0">
|
<!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0">
|
||||||
<ns-navbar :data="navbarData" :isBack="true"></ns-navbar>
|
<ns-navbar :data="navbarData" :isBack="true"></ns-navbar>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="content" :style="themeColor">
|
||||||
<view class="content">
|
|
||||||
<view class="head-wrap">
|
<view class="head-wrap">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<view class="search-wrap uni-flex uni-row">
|
<view class="search-wrap uni-flex uni-row">
|
||||||
@@ -63,7 +62,7 @@
|
|||||||
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{langstatus?$lang('Make'):'咨询'}}</text>
|
<text class="price price-style large">{{langstatus?$lang('Make'):'询价'}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@@ -148,7 +147,7 @@
|
|||||||
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{langstatus?$lang('Make'):'咨询'}}</text>
|
<text class="price price-style large">{{langstatus?$lang('Make'):'询价'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
@@ -271,6 +270,11 @@
|
|||||||
<!-- 小程序隐私协议 -->
|
<!-- 小程序隐私协议 -->
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<!-- 底部tabBar -->
|
||||||
|
<view id="tab-bar">
|
||||||
|
<diy-bottom-nav></diy-bottom-nav>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -294,6 +294,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lineheight-clear {
|
.lineheight-clear {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商品列表单列样式
|
// 商品列表单列样式
|
||||||
@@ -386,12 +388,20 @@
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
|
|
||||||
|
background-color: var(--main-color);
|
||||||
|
border-radius: 35rpx;
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
margin-right: 6rpx;
|
margin-right: 6rpx;
|
||||||
color: var(--price-color);
|
color: var(--price-color);
|
||||||
}
|
}
|
||||||
.price {
|
.price {
|
||||||
color: var(--price-color);
|
color: var(--price-color);
|
||||||
|
color: #fff !important;
|
||||||
|
font-size: 15rpx !important;
|
||||||
|
font-weight: bold !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
||||||
<view class="detail-container" :class="{ 'safe-area': isIphoneX }">
|
|
||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
||||||
<view class="order-status-left">
|
<view class="order-status-left">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
||||||
<view class="detail-container" :class="{ 'safe-area': isIphoneX }">
|
|
||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
||||||
<view class="order-status-left">
|
<view class="order-status-left">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="order-container" :style="themeColor">
|
||||||
<view class="order-container">
|
|
||||||
<view class="cate-search">
|
<view class="cate-search">
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search"
|
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<common-payment :api="api" create-data-key="orderCreateData" ref="payment"></common-payment>
|
<common-payment :api="api" create-data-key="orderCreateData" ref="payment"></common-payment>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="apply" :style="themeColor">
|
||||||
<view class="apply">
|
|
||||||
<!-- 导航栏 -->
|
<!-- 导航栏 -->
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<view class="head-nav color-base-bg"></view>
|
<view class="head-nav color-base-bg"></view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="bill" :style="themeColor">
|
||||||
<view class="bill" >
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" top="0" class="member-point" :size="8" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" top="0" class="member-point" :size="8" v-if="storeToken">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)">
|
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="content" :style="themeColor">
|
||||||
<view class="content">
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getGoodsList">
|
<mescroll-uni ref="mescroll" @getData="getGoodsList">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
<view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="level-top">
|
<view class="level-top">
|
||||||
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="withdraw-cate">
|
<view class="withdraw-cate">
|
||||||
<block v-for="(item, index) in category" :key="index">
|
<block v-for="(item, index) in category" :key="index">
|
||||||
<view @click="selectCate(item.id)" class="cate-li" :class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}</view>
|
<view @click="selectCate(item.id)" class="cate-li" :class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="order-detail">
|
<view class="order-detail">
|
||||||
<view class="order-detail-box">
|
<view class="order-detail-box">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
|
|||||||
@@ -1,55 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view class="fenxiao-promote" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
<view class="fenxiao-promote"
|
||||||
<view class="my-earnings">
|
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||||
<view class="earnings-head-wrap">
|
<view class="my-earnings">
|
||||||
<view class="earnings-head">
|
<view class="earnings-head-wrap">
|
||||||
<image class="name" :src="$util.img('public/uniapp/fenxiao/promote/my_earnings.png')" mode="aspectFit"></image>
|
<view class="earnings-head">
|
||||||
<image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')" mode="aspectFill"></image>
|
<image class="name" :src="$util.img('public/uniapp/fenxiao/promote/my_earnings.png')"
|
||||||
<view class="content">
|
mode="aspectFit"></image>
|
||||||
累计收益
|
<image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')"
|
||||||
<text class="money-text">{{ detailData.total_commission }}</text>
|
mode="aspectFill"></image>
|
||||||
元
|
<view class="content">
|
||||||
</view>
|
累计收益
|
||||||
</view>
|
<text class="money-text">{{ detailData.total_commission }}</text>
|
||||||
</view>
|
元
|
||||||
<view class="earnings-body">
|
|
||||||
<view class="earnings-tab">
|
|
||||||
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">已邀请好友</text>
|
|
||||||
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">已下单好友</text>
|
|
||||||
</view>
|
|
||||||
<scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()">
|
|
||||||
<view class="earnings-list" v-if="promote.list.length">
|
|
||||||
<view class="earnings-item" v-for="(item, index) in promote.list" :key="index">
|
|
||||||
<image
|
|
||||||
class="item-img"
|
|
||||||
:src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head"
|
|
||||||
@error="item.headimg = $util.getDefaultImage().head"
|
|
||||||
mode="aspectFill"
|
|
||||||
></image>
|
|
||||||
<view class="item-content">
|
|
||||||
<view class="item-name multi-hidden">{{ item.nickname }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="earnings-empty" v-else>暂无已邀请好友,快去邀请吧</view>
|
</view>
|
||||||
</scroll-view>
|
<view class="earnings-body">
|
||||||
|
<view class="earnings-tab">
|
||||||
|
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">已邀请好友</text>
|
||||||
|
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">已下单好友</text>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()">
|
||||||
|
<view class="earnings-list" v-if="promote.list.length">
|
||||||
|
<view class="earnings-item" v-for="(item, index) in promote.list" :key="index">
|
||||||
|
<image class="item-img"
|
||||||
|
:src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head"
|
||||||
|
@error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
|
||||||
|
<view class="item-content">
|
||||||
|
<view class="item-name multi-hidden">{{ item.nickname }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="earnings-empty" v-else>暂无已邀请好友,快去邀请吧</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="activity-rules">
|
||||||
<view class="activity-rules">
|
<image class="rules-name" :src="$util.img('public/uniapp/fenxiao/promote/activity_rules.png')"
|
||||||
<image class="rules-name" :src="$util.img('public/uniapp/fenxiao/promote/activity_rules.png')" mode="aspectFit"></image>
|
mode="aspectFit"></image>
|
||||||
<view class="content" v-if="promoteContent.content"><rich-text :nodes="promoteContent.content"></rich-text></view>
|
<view class="content" v-if="promoteContent.content"><rich-text
|
||||||
<view class="rules-empty" v-else>暂无活动规则</view>
|
:nodes="promoteContent.content"></rich-text></view>
|
||||||
</view>
|
<view class="rules-empty" v-else>暂无活动规则</view>
|
||||||
<view class="active-btn"><button type="primary" @click="toPoster()">邀请好友</button></view>
|
</view>
|
||||||
<ns-copyright></ns-copyright>
|
<view class="active-btn"><button type="primary" @click="toPoster()">邀请好友</button></view>
|
||||||
<ns-login ref="login"></ns-login>
|
<ns-copyright></ns-copyright>
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<ns-login ref="login"></ns-login>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- 小程序隐私协议 -->
|
<!-- 小程序隐私协议 -->
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -69,11 +72,11 @@ export default {
|
|||||||
isPay: 0,
|
isPay: 0,
|
||||||
detailData: {},
|
detailData: {},
|
||||||
templateId: '',
|
templateId: '',
|
||||||
poster:'',
|
poster: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout( () => {
|
setTimeout(() => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -84,7 +87,7 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
}, 1000);
|
||||||
|
|
||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
this.getTeam();
|
this.getTeam();
|
||||||
@@ -101,8 +104,8 @@ export default {
|
|||||||
this.getPoster();
|
this.getPoster();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toPoster(){
|
toPoster() {
|
||||||
this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster,templateId:this.templateId })
|
this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster, templateId: this.templateId })
|
||||||
},
|
},
|
||||||
tabCut(index) {
|
tabCut(index) {
|
||||||
this.tabIndex = index;
|
this.tabIndex = index;
|
||||||
@@ -214,14 +217,17 @@ export default {
|
|||||||
background-color: #ff2d46;
|
background-color: #ff2d46;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
.my-earnings,
|
.my-earnings,
|
||||||
.activity-rules {
|
.activity-rules {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-earnings {
|
.my-earnings {
|
||||||
margin-top: 230rpx;
|
margin-top: 230rpx;
|
||||||
padding-bottom: 40rpx;
|
padding-bottom: 40rpx;
|
||||||
|
|
||||||
.earnings-head-wrap {
|
.earnings-head-wrap {
|
||||||
background-color: #fff7f5;
|
background-color: #fff7f5;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
@@ -229,33 +235,40 @@ export default {
|
|||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.earnings-head {
|
.earnings-head {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 60rpx;
|
padding-top: 60rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 384rpx;
|
width: 384rpx;
|
||||||
height: 74rpx;
|
height: 74rpx;
|
||||||
top: -22rpx;
|
top: -22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-bg {
|
.money-bg {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-text {
|
.money-text {
|
||||||
margin: 0 6rpx;
|
margin: 0 6rpx;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.earnings-body {
|
.earnings-body {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
|
||||||
.earnings-tab {
|
.earnings-tab {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
@@ -264,9 +277,11 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #e93224;
|
color: #e93224;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
|
|
||||||
text.active {
|
text.active {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
@@ -279,35 +294,43 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.earnings-content-wrap {
|
.earnings-content-wrap {
|
||||||
max-height: 440rpx;
|
max-height: 440rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.earnings-item {
|
.earnings-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-img {
|
.item-img {
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-time {
|
.item-time {
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
color: $color-tip;
|
color: $color-tip;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-name {
|
.item-name {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.money {
|
.money {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
color: #f9b124;
|
color: #f9b124;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.earnings-empty {
|
.earnings-empty {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -316,10 +339,12 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-rules {
|
.activity-rules {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 60rpx;
|
margin-top: 60rpx;
|
||||||
min-height: 300rpx;
|
min-height: 300rpx;
|
||||||
|
|
||||||
.rules-name {
|
.rules-name {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 384rpx;
|
width: 384rpx;
|
||||||
@@ -328,9 +353,11 @@ export default {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 70rpx 20rpx 0;
|
padding: 70rpx 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rules-empty {
|
.rules-empty {
|
||||||
padding-top: 140rpx;
|
padding-top: 140rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<swiper class="swiper" @change="getIndex">
|
<swiper class="swiper" @change="getIndex">
|
||||||
<swiper-item v-for="(item, index) in poster" :key="index">
|
<swiper-item v-for="(item, index) in poster" :key="index">
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
|
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
|
||||||
<view slot="list">
|
<view slot="list">
|
||||||
<block v-if="list.length != 0">
|
<block v-if="list.length != 0">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" top="20" class="member-point" :size="8" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" top="20" class="member-point" :size="8" v-if="storeToken">
|
||||||
<view class="goods_list" slot="list">
|
<view class="goods_list" slot="list">
|
||||||
<view class="order-list">
|
<view class="order-list">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="team-cate" v-if="storeToken && levelNum > 1">
|
<view class="team-cate" v-if="storeToken && levelNum > 1">
|
||||||
<block v-for="(item, index) in levelList" :key="index">
|
<block v-for="(item, index) in levelList" :key="index">
|
||||||
<view class="cate-li" :class="{ 'active color-base-text color-base-border': currentLevel == item.level }" @click="selectLevel(item.level)">{{ item.name }}</view>
|
<view class="cate-li" :class="{ 'active color-base-text color-base-border': currentLevel == item.level }" @click="selectLevel(item.level)">{{ item.name }}</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="bank-account-wrap" @click="goAccount()">
|
<view class="bank-account-wrap" @click="goAccount()">
|
||||||
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance">
|
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance">
|
||||||
<text class="tx-to">提现到</text>
|
<text class="tx-to">提现到</text>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni @getData="getData" class="member-point">
|
<mescroll-uni @getData="getData" class="member-point">
|
||||||
<view slot="list">
|
<view slot="list">
|
||||||
<block v-if="withdrawList.length">
|
<block v-if="withdrawList.length">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="money-wrap">
|
<view class="money-wrap">
|
||||||
<text>-{{ detail.money }}</text>
|
<text>-{{ detail.money }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="content" :style="themeColor">
|
||||||
<view class="content">
|
|
||||||
<view class="head-wrap">
|
<view class="head-wrap">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
|
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
|
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询价' }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +163,7 @@
|
|||||||
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
|
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询价' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="category-page-wrap category-template-1" style="height: calc(-56px + 100vh);">
|
<view class="category-page-wrap category-template-1" style="height: calc(-56px + 100vh);">
|
||||||
|
|
||||||
<!-- <view class="search-box" @click="$util.redirectTo('/pages_tool/goods/search')">
|
<!-- <view class="search-box" @click="$util.redirectTo('/pages_tool/goods/search')">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view scroll-y="true" class="goods-detail" :class="isIphoneX ? 'active' : ''">
|
<view scroll-y="true" class="goods-detail" :class="isIphoneX ? 'active' : ''">
|
||||||
<view class="goods-container">
|
<view class="goods-container">
|
||||||
<view class="goods-media">
|
<view class="goods-media">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="content" :style="themeColor">
|
||||||
<view class="content">
|
|
||||||
<view class="head-wrap">
|
<view class="head-wrap">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<view class="search-wrap uni-flex uni-row">
|
<view class="search-wrap uni-flex uni-row">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="conteiner" :style="themeColor">
|
||||||
<view class="conteiner">
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="point-navbar"
|
<view class="point-navbar"
|
||||||
:style="{'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">
|
:style="{'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="order-container" :style="themeColor">
|
||||||
<view class="order-container">
|
|
||||||
<view class="order-nav" v-if="storeToken">
|
<view class="order-nav" v-if="storeToken">
|
||||||
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
|
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
|
||||||
<text class="uni-tab-item-title" :class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''">
|
<text class="uni-tab-item-title" :class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="order-container" :style="themeColor" :class="{ 'safe-area': isIphoneX }">
|
||||||
<view class="order-container" :class="{ 'safe-area': isIphoneX }">
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="payment-navbar" :style="{
|
<view class="payment-navbar" :style="{
|
||||||
'padding-top': menuButtonBounding.top + 'px',
|
'padding-top': menuButtonBounding.top + 'px',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="image-wrap">
|
<view class="image-wrap">
|
||||||
<image :src="$util.img('public/uniapp/pay/pay_success.png')" class="result-image" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/pay/pay_success.png')" class="result-image" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view style="padding: 20rpx;" :style="themeColor">
|
||||||
<view style="padding: 20rpx;">
|
|
||||||
<rich-text :nodes="content"></rich-text>
|
<rich-text :nodes="content"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="page" :style="themeColor">
|
||||||
<view class="page">
|
|
||||||
<view class="help-title">{{ detail.article_title }}</view>
|
<view class="help-title">{{ detail.article_title }}</view>
|
||||||
<view class="help-meta" v-if="detail.is_show_release_time == 1">
|
<view class="help-meta" v-if="detail.is_show_release_time == 1">
|
||||||
<text class="help-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>
|
<text class="help-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni @getData="getData" ref="mescroll">
|
<mescroll-uni @getData="getData" ref="mescroll">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="article-wrap" v-if="list.length">
|
<view class="article-wrap" v-if="list.length">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="about w100">
|
<view class="about w100">
|
||||||
<view class="bg border-top"></view>
|
<view class="bg border-top"></view>
|
||||||
<view class="list_cotact padding-top">
|
<view class="list_cotact padding-top">
|
||||||
@@ -146,9 +145,9 @@
|
|||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||||
|
<hover-nav></hover-nav>
|
||||||
|
<diy-bottom-nav></diy-bottom-nav>
|
||||||
</view>
|
</view>
|
||||||
<hover-nav></hover-nav>
|
|
||||||
<diy-bottom-nav></diy-bottom-nav>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="page" v-if="detail">
|
<view class="page" v-if="detail">
|
||||||
<view class="form-banner">
|
<view class="form-banner">
|
||||||
<image :src="$util.img('public/uniapp/form/banner.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/form/banner.png')" mode="widthFix"></image>
|
||||||
|
|||||||
165
pages_tool/form/formdata.vue
Normal file
165
pages_tool/form/formdata.vue
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<block v-if="detail">
|
||||||
|
<view class="page">
|
||||||
|
<view class="system-form-wrap">
|
||||||
|
<view class="form-title" style="text-align:center;padding-top:40rpx;font-weight:600;font-size:30rpx;">
|
||||||
|
请填写表单所需信息
|
||||||
|
</view>
|
||||||
|
<ns-newform ref="form" :data="detail.json_data" @submit="create"></ns-newform>
|
||||||
|
<button class="button mini" style="font-size:32rpx;" type="primary" size="mini" @click="create">提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<ns-empty :text="complete ? '提交成功' : '未获取到表单信息'" :isIndex="false"></ns-empty>
|
||||||
|
</block>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
<ns-login ref="login"></ns-login>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: 0,
|
||||||
|
detail: null,
|
||||||
|
isRepeat: false,
|
||||||
|
complete: false,
|
||||||
|
scroll: true,
|
||||||
|
uniacid: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
if (!options.uniacid) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '参数错误',
|
||||||
|
showCancel: false,
|
||||||
|
success: () => {}
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.uniacid = options.uniacid
|
||||||
|
this.id = options.id || 0
|
||||||
|
|
||||||
|
if (options.scene) {
|
||||||
|
const scene = decodeURIComponent(options.scene)
|
||||||
|
const params = scene.split('&')
|
||||||
|
params.length && params.forEach(item => {
|
||||||
|
if (item.indexOf('id') != -1) {
|
||||||
|
this.id = item.split('-')[1]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
storeToken(newVal, oldVal) {
|
||||||
|
newVal && this.getData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/form/api/form/info',
|
||||||
|
data: {
|
||||||
|
form_id: this.id,
|
||||||
|
uniacid: this.uniacid
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
this.detail = res.data
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res.data.form_name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.$refs.loadingCover && this.$refs.loadingCover.hide()
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
this.$refs.loadingCover && this.$refs.loadingCover.hide()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
if (!this.$refs.form.verify()) return
|
||||||
|
|
||||||
|
if (this.isRepeat) return
|
||||||
|
|
||||||
|
this.isRepeat = true
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/form/api/form/create',
|
||||||
|
data: {
|
||||||
|
form_id: this.id,
|
||||||
|
form_data: JSON.stringify(this.$refs.form.formData),
|
||||||
|
uniacid: this.uniacid
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '提交成功',
|
||||||
|
showCancel: false,
|
||||||
|
success: () => {}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isRepeat = false
|
||||||
|
this.$util.showToast({
|
||||||
|
title: res.message
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
page {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-banner {
|
||||||
|
width: 100vw;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-banner image {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.system-form-wrap {
|
||||||
|
border-radius: 32rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 0 60rpx 0;
|
||||||
|
padding: 0 12rpx;
|
||||||
|
transform: translateY(-40rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.system-form-wrap .form-title {
|
||||||
|
line-height: 100rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.system-form-wrap .button {
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx !important;
|
||||||
|
margin-top: 30rpx !important;
|
||||||
|
width: 84%;
|
||||||
|
margin-left: 28rpx !important;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
background: #f4391c;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.system-form-wrap .form-wrap {
|
||||||
|
background: #fff;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="cf-container color-line-border">
|
<view class="cf-container color-line-border">
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
<view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="wx-code">
|
<view class="wx-code">
|
||||||
<image :src="$util.img(path)" />
|
<image :src="$util.img(path)" />
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="goods-evaluate" :style="themeColor">
|
||||||
<view class="goods-evaluate">
|
|
||||||
<view class="evaluate-tab">
|
<view class="evaluate-tab">
|
||||||
<view v-for="(item, index) in evaluateList" :key="index" :class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)">
|
<view v-for="(item, index) in evaluateList" :key="index" :class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)">
|
||||||
{{ item.name }}({{ item.count }})
|
{{ item.name }}({{ item.count }})
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="page" :style="themeColor">
|
||||||
<view class="page">
|
|
||||||
<view class="closeBox">
|
<view class="closeBox">
|
||||||
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
|
||||||
<text class="close-title">您查看的商品不存在,可能已下架或被删除</text>
|
<text class="close-title">您查看的商品不存在,可能已下架或被删除</text>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="cate-search">
|
<view class="cate-search">
|
||||||
<view class="search-box" @click="search()" @tap.stop="search()">
|
<view class="search-box" @click="search()" @tap.stop="search()">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="page" :style="themeColor">
|
||||||
<view class="page">
|
|
||||||
<view class="help-title">{{ detail.title }}</view>
|
<view class="help-title">{{ detail.title }}</view>
|
||||||
<view class="help-content"><rich-text :nodes="content"></rich-text></view>
|
<view class="help-content"><rich-text :nodes="content"></rich-text></view>
|
||||||
<view class="help-meta">
|
<view class="help-meta">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="help" :style="themeColor">
|
||||||
<view class="help">
|
|
||||||
<block v-if="dataList.length">
|
<block v-if="dataList.length">
|
||||||
<view class="help-item" v-for="(item, index) in dataList" :key="index">
|
<view class="help-item" v-for="(item, index) in dataList" :key="index">
|
||||||
<view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view>
|
<view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view>
|
||||||
|
|||||||
@@ -1,95 +1,104 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
|
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
|
||||||
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
class="page-img">
|
||||||
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true"/>
|
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
|
||||||
</view>
|
:style="{ backgroundImage: bgImg }">
|
||||||
|
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
|
||||||
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :haveTopCategory="true"/>
|
|
||||||
<ns-copyright v-show="isShowCopyRight"/>
|
|
||||||
</diy-index-page>
|
|
||||||
|
|
||||||
<view v-else class="bg-index" :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"/>
|
|
||||||
<ns-copyright v-show="isShowCopyRight"/>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<template v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
|
|
||||||
<view @touchmove.prevent.stop>
|
|
||||||
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
|
||||||
<view class="image-wrap">
|
|
||||||
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle" @click="uniPopupWindowFn()" mode="aspectFit"/>
|
|
||||||
</view>
|
|
||||||
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
|
|
||||||
</uni-popup>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 底部tabBar -->
|
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
||||||
<view class="page-bottom" v-if="openBottomNav">
|
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
||||||
<diy-bottom-nav @callback="callback" :name="name"/>
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
</view>
|
:haveTopCategory="true" />
|
||||||
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
|
</diy-index-page>
|
||||||
|
|
||||||
<!-- 收藏 -->
|
<view v-else class="bg-index"
|
||||||
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
||||||
<view v-if="showTip" class="collectPopupWindow" :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
|
||||||
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit"/>
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
<text @click="closeCollectPopupWindow">我知道了</text>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<template
|
||||||
<!-- 小程序隐私协议 -->
|
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<view @touchmove.prevent.stop>
|
||||||
<!-- #endif -->
|
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
||||||
|
<view class="image-wrap">
|
||||||
|
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
|
||||||
|
@click="uniPopupWindowFn()" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 底部tabBar -->
|
||||||
|
<view class="page-bottom" v-if="openBottomNav">
|
||||||
|
<diy-bottom-nav @callback="callback" :name="name" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 收藏 -->
|
||||||
|
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
||||||
|
<view v-if="showTip" class="collectPopupWindow"
|
||||||
|
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
||||||
|
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
||||||
|
<text @click="closeCollectPopupWindow">我知道了</text>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<!-- 小程序隐私协议 -->
|
||||||
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
|
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
|
||||||
import diyJs from '@/common/js/diy.js';
|
import diyJs from '@/common/js/diy.js';
|
||||||
import microPageJs from './public/js/diy.js';
|
import microPageJs from './public/js/diy.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniPopup,
|
uniPopup,
|
||||||
nsNavbar
|
nsNavbar
|
||||||
},
|
},
|
||||||
mixins: [diyJs, microPageJs]
|
mixins: [diyJs, microPageJs]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '@/common/css/diy.scss';
|
@import '@/common/css/diy.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choose-store>>>.goodslist-uni-popup-box {
|
.choose-store>>>.goodslist-uni-popup-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .placeholder {
|
/deep/ .placeholder {
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/::-webkit-scrollbar {
|
/deep/::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/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>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="find" :style="themeColor">
|
||||||
<view class="find">
|
|
||||||
<view class="iconfont icon-close" @click="navigateBack()"></view>
|
<view class="iconfont icon-close" @click="navigateBack()"></view>
|
||||||
<view class="header-wrap">
|
<view class="header-wrap">
|
||||||
<block v-if="stepShow == 0">
|
<block v-if="stepShow == 0">
|
||||||
|
|||||||
@@ -1,482 +1,498 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<scroll-view scroll-y="false" class="container">
|
<scroll-view scroll-y="false" class="container">
|
||||||
<view class="header-wrap" :style="{backgroundImage: 'url('+$util.img('public/uniapp/member/head.png')+')'}">
|
<view class="header-wrap" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/member/head.png') + ')' }">
|
||||||
<view class="t-b">
|
<view class="t-b">
|
||||||
<div v-html="$lang('welcomeText')"></div>
|
<div v-html="$lang('welcomeText')"></div>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="body-wrap">
|
||||||
<view class="body-wrap">
|
<view class="form-wrap">
|
||||||
<view class="form-wrap">
|
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
||||||
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
<view class="content">
|
||||||
<view class="content">
|
<!-- <view class="area-code">+86</view> -->
|
||||||
<!-- <view class="area-code">+86</view> -->
|
<input type="number" :placeholder="$lang('mobileInputPlaceholder')"
|
||||||
<input type="number" :placeholder="$lang('mobileInputPlaceholder')" placeholder-class="input-placeholder" class="input" maxlength="11" v-model="formData.mobile" />
|
placeholder-class="input-placeholder" class="input" maxlength="11"
|
||||||
|
v-model="formData.mobile" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="input-wrap" v-show="loginMode == 'account'">
|
||||||
<view class="input-wrap" v-show="loginMode == 'account'">
|
<view class="content">
|
||||||
<view class="content">
|
<input type="text" :placeholder="$lang('accountInputPlaceholder')"
|
||||||
<input type="text" :placeholder="$lang('accountInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.account" />
|
placeholder-class="input-placeholder" class="input" v-model="formData.account" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="input-wrap" v-show="loginMode == 'account'">
|
||||||
<view class="input-wrap" v-show="loginMode == 'account'">
|
<view class="content">
|
||||||
<view class="content">
|
<input type="password" :placeholder="$lang('passwordInputPlaceholder')"
|
||||||
<input type="password" :placeholder="$lang('passwordInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.password" />
|
placeholder-class="input-placeholder" class="input" v-model="formData.password" />
|
||||||
<view class="align-right" v-show="loginMode == 'account'">
|
<view class="align-right" v-show="loginMode == 'account'">
|
||||||
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
|
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
||||||
|
<view class="content">
|
||||||
|
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')"
|
||||||
|
placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
|
||||||
|
<view class="dynacode"
|
||||||
|
:class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
|
||||||
|
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
|
||||||
<view class="content">
|
<view class="btn_view">
|
||||||
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
|
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg"
|
||||||
<view class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
|
style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
|
||||||
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
|
</view>
|
||||||
</view>
|
<view class="regisiter-agreement"
|
||||||
|
style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
|
||||||
|
<view style="" class="iconfont"
|
||||||
|
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
|
||||||
|
@click="isAgree = !isAgree"></view>
|
||||||
|
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{
|
||||||
|
$lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')"
|
||||||
|
style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text
|
||||||
|
@click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{
|
||||||
|
$lang('userServiceAgreementText') }}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
<view class="btn_view">
|
<register-reward ref="registerReward"></register-reward>
|
||||||
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg" style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="regisiter-agreement" style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
|
|
||||||
<view style="" class="iconfont" :class=" isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2' " @click="isAgree = !isAgree"></view>
|
|
||||||
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{ $lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')" style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text @click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{ $lang('userServiceAgreementText') }}</text></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
<register-reward ref="registerReward"></register-reward>
|
|
||||||
</scroll-view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import validate from 'common/js/validate.js';
|
import validate from 'common/js/validate.js';
|
||||||
import registerReward from '@/components/register-reward/register-reward.vue';
|
import registerReward from '@/components/register-reward/register-reward.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
// loginMode: 'account',
|
// loginMode: 'account',
|
||||||
loginMode: 'mobile',
|
loginMode: 'mobile',
|
||||||
formData: {
|
formData: {
|
||||||
mobile: '',
|
mobile: '',
|
||||||
account: '',
|
account: '',
|
||||||
password: '',
|
password: '',
|
||||||
vercode: '',
|
vercode: '',
|
||||||
dynacode: '',
|
dynacode: '',
|
||||||
key: ''
|
key: ''
|
||||||
},
|
},
|
||||||
captcha: {
|
captcha: {
|
||||||
id: '',
|
id: '',
|
||||||
img: ''
|
img: ''
|
||||||
},
|
},
|
||||||
isSub: false, // 提交防重复
|
isSub: false, // 提交防重复
|
||||||
back: '', // 返回页
|
back: '', // 返回页
|
||||||
redirect: 'redirectTo', // 跳转方式
|
redirect: 'redirectTo', // 跳转方式
|
||||||
dynacodeData: {
|
dynacodeData: {
|
||||||
seconds: 120,
|
seconds: 120,
|
||||||
timer: null,
|
timer: null,
|
||||||
codeText: this.$lang('getDynacode'),
|
codeText: this.$lang('getDynacode'),
|
||||||
isSend: false
|
isSend: false
|
||||||
},
|
},
|
||||||
registerConfig: {
|
registerConfig: {
|
||||||
register: 'mobile',
|
register: 'mobile',
|
||||||
login: ''
|
login: ''
|
||||||
},
|
},
|
||||||
captchaConfig: 0,
|
captchaConfig: 0,
|
||||||
authInfo: null
|
authInfo: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
registerReward
|
registerReward
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.back) this.back = option.back;
|
if (option.back) this.back = option.back;
|
||||||
this.getRegisterConfig();
|
this.getRegisterConfig();
|
||||||
// this.getCaptchaConfig();
|
// this.getCaptchaConfig();
|
||||||
this.authInfo = uni.getStorageSync('authInfo');
|
this.authInfo = uni.getStorageSync('authInfo');
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() { },
|
||||||
onReady() {
|
onReady() {
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取验证码配置
|
* 获取验证码配置
|
||||||
*/
|
*/
|
||||||
getCaptchaConfig() {
|
getCaptchaConfig() {
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: '/api/config/getCaptchaConfig',
|
url: '/api/config/getCaptchaConfig',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
this.captchaConfig = res.data.shop_reception_login;
|
this.captchaConfig = res.data.shop_reception_login;
|
||||||
if (this.captchaConfig == 1) this.getCaptcha();
|
if (this.captchaConfig == 1) this.getCaptcha();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取注册配置
|
|
||||||
*/
|
|
||||||
getRegisterConfig() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/register/config',
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
// this.registerConfig = res.data.value;
|
|
||||||
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
|
|
||||||
// else this.loginMode = 'account';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 切换登录方式
|
|
||||||
*/
|
|
||||||
switchLoginMode() {
|
|
||||||
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取验证码
|
|
||||||
*/
|
|
||||||
getCaptcha() {
|
|
||||||
if (this.captchaConfig == 0) return;
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/captcha/captcha',
|
|
||||||
data: {
|
|
||||||
captcha_id: this.captcha.id
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
this.captcha = res.data;
|
|
||||||
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 去注册
|
|
||||||
*/
|
|
||||||
toRegister() {
|
|
||||||
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
|
|
||||||
back: encodeURIComponent(this.back)
|
|
||||||
});
|
|
||||||
else this.$util.redirectTo('/pages_tool/login/register');
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 忘记密码
|
|
||||||
*/
|
|
||||||
forgetPassword() {
|
|
||||||
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
|
|
||||||
back: encodeURIComponent(this.back)
|
|
||||||
});
|
|
||||||
else this.$util.redirectTo('/pages_tool/login/find');
|
|
||||||
},
|
|
||||||
tourl(url){
|
|
||||||
this.$util.redirectTo(url);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 登录
|
|
||||||
*/
|
|
||||||
login() {
|
|
||||||
if (!this.isAgree) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.$lang('agreeAgreementTip')
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (this.loginMode == 'account') {
|
});
|
||||||
var url = '/api/login/login';
|
},
|
||||||
|
/**
|
||||||
|
* 获取注册配置
|
||||||
|
*/
|
||||||
|
getRegisterConfig() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/register/config',
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
// this.registerConfig = res.data.value;
|
||||||
|
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
|
||||||
|
// else this.loginMode = 'account';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 切换登录方式
|
||||||
|
*/
|
||||||
|
switchLoginMode() {
|
||||||
|
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取验证码
|
||||||
|
*/
|
||||||
|
getCaptcha() {
|
||||||
|
if (this.captchaConfig == 0) return;
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/captcha/captcha',
|
||||||
|
data: {
|
||||||
|
captcha_id: this.captcha.id
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
this.captcha = res.data;
|
||||||
|
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 去注册
|
||||||
|
*/
|
||||||
|
toRegister() {
|
||||||
|
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
|
||||||
|
back: encodeURIComponent(this.back)
|
||||||
|
});
|
||||||
|
else this.$util.redirectTo('/pages_tool/login/register');
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 忘记密码
|
||||||
|
*/
|
||||||
|
forgetPassword() {
|
||||||
|
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
|
||||||
|
back: encodeURIComponent(this.back)
|
||||||
|
});
|
||||||
|
else this.$util.redirectTo('/pages_tool/login/find');
|
||||||
|
},
|
||||||
|
tourl(url) {
|
||||||
|
this.$util.redirectTo(url);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 登录
|
||||||
|
*/
|
||||||
|
login() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: this.$lang('agreeAgreementTip')
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.loginMode == 'account') {
|
||||||
|
var url = '/api/login/login';
|
||||||
|
data = {
|
||||||
|
username: this.formData.account,
|
||||||
|
password: this.formData.password
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var url = '/api/login/mobile',
|
||||||
data = {
|
data = {
|
||||||
username: this.formData.account,
|
mobile: this.formData.mobile,
|
||||||
password: this.formData.password
|
key: this.formData.key,
|
||||||
|
code: this.formData.dynacode
|
||||||
};
|
};
|
||||||
} else {
|
}
|
||||||
var url = '/api/login/mobile',
|
if (this.captcha.id != '') {
|
||||||
data = {
|
data.captcha_id = this.captcha.id;
|
||||||
mobile: this.formData.mobile,
|
data.captcha_code = this.formData.vercode;
|
||||||
key: this.formData.key,
|
}
|
||||||
code: this.formData.dynacode
|
if (this.authInfo) Object.assign(data, this.authInfo);
|
||||||
};
|
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
|
||||||
}
|
|
||||||
if (this.captcha.id != '') {
|
|
||||||
data.captcha_id = this.captcha.id;
|
|
||||||
data.captcha_code = this.formData.vercode;
|
|
||||||
}
|
|
||||||
if (this.authInfo) Object.assign(data, this.authInfo);
|
|
||||||
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
|
|
||||||
|
|
||||||
if (this.verify(data)) {
|
if (this.verify(data)) {
|
||||||
if (this.isSub) return;
|
if (this.isSub) return;
|
||||||
this.isSub = true;
|
this.isSub = true;
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url,
|
url,
|
||||||
data,
|
data,
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code >= 0) {
|
if (res.code >= 0) {
|
||||||
var can_receive_registergift = res.data.can_receive_registergift;
|
var can_receive_registergift = res.data.can_receive_registergift;
|
||||||
this.$store.commit('setToken', res.data.token);
|
this.$store.commit('setToken', res.data.token);
|
||||||
this.$store.dispatch('getCartNumber');
|
this.$store.dispatch('getCartNumber');
|
||||||
this.getMemberInfo(() => {
|
this.getMemberInfo(() => {
|
||||||
if (can_receive_registergift == 1) {
|
if (can_receive_registergift == 1) {
|
||||||
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 : '/pages/member/index';
|
||||||
if(this.$refs.registerReward) this.$refs.registerReward.open(back);
|
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||||
|
} else {
|
||||||
|
if (this.back != '') {
|
||||||
|
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
||||||
} else {
|
} else {
|
||||||
if (this.back != '') {
|
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||||
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} else {
|
});
|
||||||
this.isSub = false;
|
} else {
|
||||||
this.getCaptcha();
|
|
||||||
this.$util.showToast({
|
|
||||||
title: res.message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
this.isSub = false;
|
this.isSub = false;
|
||||||
this.getCaptcha();
|
this.getCaptcha();
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 登录验证
|
|
||||||
* @param {Object} data
|
|
||||||
*/
|
|
||||||
verify(data) {
|
|
||||||
let rule = [];
|
|
||||||
// 手机号验证
|
|
||||||
if (this.loginMode == 'mobile') {
|
|
||||||
rule = [{
|
|
||||||
name: 'mobile',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('enterMobileTip')
|
|
||||||
}, {
|
|
||||||
name: 'mobile',
|
|
||||||
checkType: 'phoneno',
|
|
||||||
errorMsg: this.$lang('enterCorrectMobileTip')
|
|
||||||
}];
|
|
||||||
if (this.captchaConfig == 1) {
|
|
||||||
if (this.captcha.id != '') rule.push({
|
|
||||||
name: 'captcha_code',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('captchaPlaceholder')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
rule.push({
|
|
||||||
name: 'code',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('dynacodePlaceholder')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 账号验证
|
|
||||||
if (this.loginMode == 'account') {
|
|
||||||
rule = [{
|
|
||||||
name: 'username',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('accountPlaceholder')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'password',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('passwordPlaceholder')
|
|
||||||
}
|
|
||||||
];
|
|
||||||
if (this.captchaConfig == 1) {
|
|
||||||
if (this.captcha.id != '') rule.push({
|
|
||||||
name: 'captcha_code',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('captchaPlaceholder')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var checkRes = validate.check(data, rule);
|
|
||||||
if (checkRes) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: validate.error
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mobileAuthLogin(e) {
|
|
||||||
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
|
||||||
var data = {
|
|
||||||
iv: e.detail.iv,
|
|
||||||
encryptedData: e.detail.encryptedData
|
|
||||||
};
|
|
||||||
if (Object.keys(this.authInfo).length) {
|
|
||||||
Object.assign(data, this.authInfo);
|
|
||||||
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
|
|
||||||
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
|
|
||||||
}
|
|
||||||
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
|
|
||||||
|
|
||||||
if (this.isSub) return;
|
|
||||||
this.isSub = true;
|
|
||||||
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/tripartite/mobileauth',
|
|
||||||
data,
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
var can_receive_registergift = res.data.can_receive_registergift;
|
|
||||||
this.$store.commit('setToken', res.data.token);
|
|
||||||
this.$store.dispatch('getCartNumber');
|
|
||||||
this.getMemberInfo(() => {
|
|
||||||
if (can_receive_registergift == 1) {
|
|
||||||
let back = this.back ? this.back : '/pages/member/index';
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.isSub = false;
|
|
||||||
this.$util.showToast({
|
|
||||||
title: res.message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
this.isSub = false;
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.$lang('requestFailTip')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 发送手机动态码
|
|
||||||
*/
|
|
||||||
sendMobileCode() {
|
|
||||||
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
|
|
||||||
var data = {
|
|
||||||
mobile: this.formData.mobile,
|
|
||||||
captcha_id: this.captcha.id,
|
|
||||||
captcha_code: this.formData.vercode
|
|
||||||
};
|
|
||||||
var rule = [{
|
|
||||||
name: 'mobile',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: '请输入手机号'
|
|
||||||
}, {
|
|
||||||
name: 'mobile',
|
|
||||||
checkType: 'phoneno',
|
|
||||||
errorMsg: '请输入正确的手机号'
|
|
||||||
}];
|
|
||||||
if (this.captchaConfig == 1) {
|
|
||||||
rule.push({
|
|
||||||
name: 'captcha_code',
|
|
||||||
checkType: 'required',
|
|
||||||
errorMsg: this.$lang('enterCaptchaTip')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var checkRes = validate.check(data, rule);
|
|
||||||
if (!checkRes) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: validate.error
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.dynacodeData.isSend = true;
|
|
||||||
this.dynacodeData.timer = setInterval(() => {
|
|
||||||
this.dynacodeData.seconds--;
|
|
||||||
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/login/mobileCode',
|
|
||||||
data: data,
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
this.formData.key = res.data.key;
|
|
||||||
} else {
|
|
||||||
this.refreshDynacodeData();
|
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: res.message
|
title: res.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: res => {
|
||||||
this.$util.showToast({
|
this.isSub = false;
|
||||||
title: 'request:fail'
|
this.getCaptcha();
|
||||||
});
|
|
||||||
this.refreshDynacodeData();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
refreshDynacodeData() {
|
|
||||||
this.getCaptcha();
|
|
||||||
clearInterval(this.dynacodeData.timer);
|
|
||||||
this.dynacodeData = {
|
|
||||||
seconds: 120,
|
|
||||||
timer: null,
|
|
||||||
codeText: '获取动态码',
|
|
||||||
isSend: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
getMemberInfo(callback) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/member/info',
|
|
||||||
success: (res) => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
// 登录成功,存储会员信息
|
|
||||||
this.$store.commit('setMemberInfo', res.data);
|
|
||||||
if (callback) callback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
/**
|
||||||
'dynacodeData.seconds': {
|
* 登录验证
|
||||||
handler(newValue, oldValue) {
|
* @param {Object} data
|
||||||
if (newValue == 0) {
|
*/
|
||||||
|
verify(data) {
|
||||||
|
let rule = [];
|
||||||
|
// 手机号验证
|
||||||
|
if (this.loginMode == 'mobile') {
|
||||||
|
rule = [{
|
||||||
|
name: 'mobile',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('enterMobileTip')
|
||||||
|
}, {
|
||||||
|
name: 'mobile',
|
||||||
|
checkType: 'phoneno',
|
||||||
|
errorMsg: this.$lang('enterCorrectMobileTip')
|
||||||
|
}];
|
||||||
|
if (this.captchaConfig == 1) {
|
||||||
|
if (this.captcha.id != '') rule.push({
|
||||||
|
name: 'captcha_code',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('captchaPlaceholder')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rule.push({
|
||||||
|
name: 'code',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('dynacodePlaceholder')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账号验证
|
||||||
|
if (this.loginMode == 'account') {
|
||||||
|
rule = [{
|
||||||
|
name: 'username',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('accountPlaceholder')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'password',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('passwordPlaceholder')
|
||||||
|
}
|
||||||
|
];
|
||||||
|
if (this.captchaConfig == 1) {
|
||||||
|
if (this.captcha.id != '') rule.push({
|
||||||
|
name: 'captcha_code',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('captchaPlaceholder')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var checkRes = validate.check(data, rule);
|
||||||
|
if (checkRes) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: validate.error
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mobileAuthLogin(e) {
|
||||||
|
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||||
|
var data = {
|
||||||
|
iv: e.detail.iv,
|
||||||
|
encryptedData: e.detail.encryptedData
|
||||||
|
};
|
||||||
|
if (Object.keys(this.authInfo).length) {
|
||||||
|
Object.assign(data, this.authInfo);
|
||||||
|
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
|
||||||
|
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
|
||||||
|
}
|
||||||
|
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
|
||||||
|
|
||||||
|
if (this.isSub) return;
|
||||||
|
this.isSub = true;
|
||||||
|
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/tripartite/mobileauth',
|
||||||
|
data,
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
var can_receive_registergift = res.data.can_receive_registergift;
|
||||||
|
this.$store.commit('setToken', res.data.token);
|
||||||
|
this.$store.dispatch('getCartNumber');
|
||||||
|
this.getMemberInfo(() => {
|
||||||
|
if (can_receive_registergift == 1) {
|
||||||
|
let back = this.back ? this.back : '/pages/member/index';
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.isSub = false;
|
||||||
|
this.$util.showToast({
|
||||||
|
title: res.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
this.isSub = false;
|
||||||
|
this.$util.showToast({
|
||||||
|
title: this.$lang('requestFailTip')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 发送手机动态码
|
||||||
|
*/
|
||||||
|
sendMobileCode() {
|
||||||
|
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
|
||||||
|
var data = {
|
||||||
|
mobile: this.formData.mobile,
|
||||||
|
captcha_id: this.captcha.id,
|
||||||
|
captcha_code: this.formData.vercode
|
||||||
|
};
|
||||||
|
var rule = [{
|
||||||
|
name: 'mobile',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: '请输入手机号'
|
||||||
|
}, {
|
||||||
|
name: 'mobile',
|
||||||
|
checkType: 'phoneno',
|
||||||
|
errorMsg: '请输入正确的手机号'
|
||||||
|
}];
|
||||||
|
if (this.captchaConfig == 1) {
|
||||||
|
rule.push({
|
||||||
|
name: 'captcha_code',
|
||||||
|
checkType: 'required',
|
||||||
|
errorMsg: this.$lang('enterCaptchaTip')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
var checkRes = validate.check(data, rule);
|
||||||
|
if (!checkRes) {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: validate.error
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.dynacodeData.isSend = true;
|
||||||
|
this.dynacodeData.timer = setInterval(() => {
|
||||||
|
this.dynacodeData.seconds--;
|
||||||
|
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/login/mobileCode',
|
||||||
|
data: data,
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
this.formData.key = res.data.key;
|
||||||
|
} else {
|
||||||
this.refreshDynacodeData();
|
this.refreshDynacodeData();
|
||||||
|
this.$util.showToast({
|
||||||
|
title: res.message
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
fail: () => {
|
||||||
deep: true
|
this.$util.showToast({
|
||||||
}
|
title: 'request:fail'
|
||||||
|
});
|
||||||
|
this.refreshDynacodeData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
refreshDynacodeData() {
|
||||||
|
this.getCaptcha();
|
||||||
|
clearInterval(this.dynacodeData.timer);
|
||||||
|
this.dynacodeData = {
|
||||||
|
seconds: 120,
|
||||||
|
timer: null,
|
||||||
|
codeText: '获取动态码',
|
||||||
|
isSend: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
getMemberInfo(callback) {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/member/info',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
// 登录成功,存储会员信息
|
||||||
|
this.$store.commit('setMemberInfo', res.data);
|
||||||
|
if (callback) callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
watch: {
|
||||||
|
'dynacodeData.seconds': {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
if (newValue == 0) {
|
||||||
|
this.refreshDynacodeData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import './public/css/common.scss';
|
@import './public/css/common.scss';
|
||||||
.color-base-text{
|
|
||||||
color:#2796f2 !important
|
.color-base-text {
|
||||||
}
|
color: #2796f2 !important
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .reward-popup .uni-popup__wrapper-box {
|
/deep/ .reward-popup .uni-popup__wrapper-box {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
max-width: unset !important;
|
max-width: unset !important;
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
overflow: unset !important;
|
overflow: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ uni-toast .uni-simple-toast__text {
|
/deep/ uni-toast .uni-simple-toast__text {
|
||||||
background: red !important;
|
background: red !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="nc-info-list-content">
|
<view class="nc-info-list-content">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="account-list-content" :style="themeColor">
|
||||||
<view class="account-list-content">
|
|
||||||
<view class="edit-item">
|
<view class="edit-item">
|
||||||
<text class="tit">{{ $lang('name') }}</text>
|
<text class="tit">{{ $lang('name') }}</text>
|
||||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />
|
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getListData" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getListData" v-if="storeToken">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="address-list">
|
<view class="address-list">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="address-edit-content" :style="themeColor">
|
||||||
<view class="address-edit-content">
|
|
||||||
<view class="edit-wrap">
|
<view class="edit-wrap">
|
||||||
<view class="tip">地址信息</view>
|
<view class="tip">地址信息</view>
|
||||||
<view class="edit-item">
|
<view class="edit-item">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="bank-account-wrap" @click="goAccount()">
|
<view class="bank-account-wrap" @click="goAccount()">
|
||||||
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type">
|
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type">
|
||||||
<text class="tx-to">提现到</text>
|
<text class="tx-to">提现到</text>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="assets-wrap">
|
<view class="assets-wrap">
|
||||||
<view class="assets-block">
|
<view class="assets-block">
|
||||||
<view class="assets-tips"><text>风险提示:确认申请后您的资产将被清空且不可找回!</text></view>
|
<view class="assets-tips"><text>风险提示:确认申请后您的资产将被清空且不可找回!</text></view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="balance" :style="themeColor">
|
||||||
<view class="balance">
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="custom-navbar" :style="{
|
<view class="custom-navbar" :style="{
|
||||||
'padding-top': menuButtonBounding.top + 'px',
|
'padding-top': menuButtonBounding.top + 'px',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
|
<!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
|
||||||
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
|
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
|
||||||
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="agreement-box">
|
<view class="agreement-box">
|
||||||
<view class="agreement-intro">
|
<view class="agreement-intro">
|
||||||
<view class="align-center agreement-title">{{ agreement.title }}</view>
|
<view class="align-center agreement-title">{{ agreement.title }}</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="cancel-wrap">
|
<view class="cancel-wrap">
|
||||||
<view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')"></image></view>
|
<view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')"></image></view>
|
||||||
<view class="cancel-title">您的申请已拒绝</view>
|
<view class="cancel-title">您的申请已拒绝</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="cancelstatus-wrap">
|
<view class="cancelstatus-wrap">
|
||||||
<view class="cancelstatus-block">
|
<view class="cancelstatus-block">
|
||||||
<view class="cancelstatus-box">
|
<view class="cancelstatus-box">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="cancel-wrap">
|
<view class="cancel-wrap">
|
||||||
<view class="cancel-img">
|
<view class="cancel-img">
|
||||||
<image :src="$util.img('public/uniapp/member/success.png')"></image>
|
<image :src="$util.img('public/uniapp/member/success.png')"></image>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="member-level" :style="themeColor">
|
||||||
<view class="member-level">
|
|
||||||
<view class="level-top">
|
<view class="level-top">
|
||||||
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="page" :style="themeColor">
|
||||||
<view class="page">
|
|
||||||
<view class="agreement-title">{{ title }}</view>
|
<view class="agreement-title">{{ title }}</view>
|
||||||
<view class="agreement-content"><rich-text :nodes="content"></rich-text></view>
|
<view class="agreement-content"><rich-text :nodes="content"></rich-text></view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="member-level" :style="themeColor">
|
||||||
<view class="member-level">
|
|
||||||
<block v-if="levelList.length">
|
<block v-if="levelList.length">
|
||||||
<view class="level-top">
|
<view class="level-top">
|
||||||
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken">
|
||||||
<view class="goods_list" slot="list">
|
<view class="goods_list" slot="list">
|
||||||
<block v-if="collectionList.length > 0">
|
<block v-if="collectionList.length > 0">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="contact" :style="themeColor">
|
||||||
<view class="contact">
|
|
||||||
<image :src="$util.img('public/uniapp/member/contact_service.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/member/contact_service.png')" mode="widthFix"></image>
|
||||||
<!--<ns-contact><button type="primary">联系客服</button></ns-contact>-->
|
<!--<ns-contact><button type="primary">联系客服</button></ns-contact>-->
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor" :class="isIphoneX ? 'iphone-x' : ''">
|
||||||
<view :class="isIphoneX ? 'iphone-x' : ''">
|
|
||||||
<view class="cf-container color-line-border" v-if="storeToken">
|
<view class="cf-container color-line-border" v-if="storeToken">
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
|
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view class="container" :style="themeColor">
|
||||||
<view class="container">
|
|
||||||
<view class="head-wrap" v-if="storeToken">
|
<view class="head-wrap" v-if="storeToken">
|
||||||
<text @click="manageFootprint">{{ manage ? '完成' : '管理' }}</text>
|
<text @click="manageFootprint">{{ manage ? '完成' : '管理' }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,65 +1,66 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
|
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
|
||||||
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
|
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
|
||||||
:style="{ backgroundImage: bgImg }">
|
:style="{ backgroundImage: bgImg }">
|
||||||
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
|
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
|
||||||
</view>
|
|
||||||
|
|
||||||
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
|
||||||
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
|
||||||
:haveTopCategory="true" />
|
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
|
||||||
</diy-index-page>
|
|
||||||
|
|
||||||
<view v-else class="bg-index"
|
|
||||||
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
|
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
|
||||||
|
|
||||||
<view class="foot">
|
|
||||||
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ isEnEnv ? 'Privacy Policy' : '隐私协议'}}</view>
|
|
||||||
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ isEnEnv ? 'Registration Agreement' : '注册协议'}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<template
|
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
||||||
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
|
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
||||||
<view @touchmove.prevent.stop>
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
:haveTopCategory="true" />
|
||||||
<view class="image-wrap">
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
|
</diy-index-page>
|
||||||
@click="uniPopupWindowFn()" mode="aspectFit" />
|
|
||||||
</view>
|
<view v-else class="bg-index"
|
||||||
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
|
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
||||||
</uni-popup>
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
|
||||||
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
|
|
||||||
|
<view class="foot">
|
||||||
|
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ isEnEnv ? 'Privacy Policy' : '隐私协议'}}</view>
|
||||||
|
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ isEnEnv ? 'Registration Agreement' : '注册协议'}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 底部tabBar -->
|
<template
|
||||||
<view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav">
|
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
|
||||||
<diy-bottom-nav @callback="callback" />
|
<view @touchmove.prevent.stop>
|
||||||
</view>
|
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
||||||
|
<view class="image-wrap">
|
||||||
|
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
|
||||||
|
@click="uniPopupWindowFn()" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 收藏 -->
|
<!-- 底部tabBar -->
|
||||||
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
<view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav">
|
||||||
<view v-if="showTip" class="collectPopupWindow"
|
<diy-bottom-nav @callback="callback" />
|
||||||
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
|
||||||
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
|
||||||
<text @click="closeCollectPopupWindow">我知道了</text>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
<ns-birthday-gift ref="birthdayGift"></ns-birthday-gift>
|
<!-- 收藏 -->
|
||||||
<ns-new-gift ref="nsNewGift"></ns-new-gift>
|
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
||||||
|
<view v-if="showTip" class="collectPopupWindow"
|
||||||
|
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
||||||
|
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
||||||
|
<text @click="closeCollectPopupWindow">我知道了</text>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<ns-birthday-gift ref="birthdayGift"></ns-birthday-gift>
|
||||||
|
<ns-new-gift ref="nsNewGift"></ns-new-gift>
|
||||||
|
|
||||||
|
|
||||||
<hover-nav></hover-nav>
|
<hover-nav></hover-nav>
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- 小程序隐私协议 -->
|
<!-- 小程序隐私协议 -->
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view v-if="indent == 'all' && memberInfo" class="info-wrap">
|
<view v-if="indent == 'all' && memberInfo" class="info-wrap">
|
||||||
<!-- 头像@click="headImage" -->
|
<!-- 头像@click="headImage" -->
|
||||||
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover">
|
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<template v-if="memberInfo">
|
<template v-if="memberInfo">
|
||||||
<!-- 修改用户名 -->
|
<!-- 修改用户名 -->
|
||||||
<view v-if="indent == 'username'" class="edit-info">
|
<view v-if="indent == 'username'" class="edit-info">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor">
|
||||||
<view>
|
|
||||||
<view v-if="info" style="background-color: #fff;">
|
<view v-if="info" style="background-color: #fff;">
|
||||||
|
|
||||||
<view class="invite_adv">
|
<view class="invite_adv">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor" class="member-level">
|
||||||
<view class="member-level">
|
|
||||||
<view class="level-top">
|
<view class="level-top">
|
||||||
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor" class="member-level">
|
||||||
<view class="member-level">
|
|
||||||
<view class="grow-explain">
|
<view class="grow-explain">
|
||||||
<view class="explain-title">
|
<view class="explain-title">
|
||||||
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit"></image>
|
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit"></image>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<view :style="themeColor" class="nc-modify-content">
|
||||||
<view class="nc-modify-content">
|
|
||||||
<view class="modify">
|
<view class="modify">
|
||||||
<view>
|
<view>
|
||||||
<image v-if="newImg == ''" :src="memberImg ? $util.img(memberImg) : $util.getDefaultImage().head" @error="memberImg = $util.getDefaultImage().head" mode="aspectFill"/>
|
<image v-if="newImg == ''" :src="memberImg ? $util.img(memberImg) : $util.getDefaultImage().head" @error="memberImg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user