diff --git a/.gitignore b/.gitignore index 4a81686..d592378 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ node_modules/ unpackage/dist/ unpackage/cache/ +unpackage/resources/ /.vs diff --git a/common/config.js b/common/config.js index 6e2db42..14a38cb 100644 --- a/common/config.js +++ b/common/config.js @@ -32,6 +32,7 @@ export const whiteList = [ "pages/shouye/slots", "pages/other/web-pay-order", // 网页支付订单 "pages/other/web-pay-success", // 网页支付成功 + "pages/other/about" ]; diff --git a/common/platform/AppPlatform.js b/common/platform/AppPlatform.js index 5f2dd76..3f91525 100644 --- a/common/platform/AppPlatform.js +++ b/common/platform/AppPlatform.js @@ -1,6 +1,6 @@ import BasePlatform from './BasePlatform'; import RequestManager from '@/common/request.js' -import {navigateTo} from '@/common/router' +import { navigateTo } from '@/common/router' import { sleep, parseQueryString @@ -22,7 +22,7 @@ class AppPlatform extends BasePlatform { } AppLaunch(options) { console.log("AppLaunch", options); - + this.getConfig().then(res => { console.log("AppLaunch", res); if (res.isCheck) { @@ -212,6 +212,14 @@ class AppPlatform extends BasePlatform { // 获取基础菜单列表 const baseMenuList = super.getUserMenuList(); let menuList = []; + const customServiceMenu = { + id: 13, + show: true, + title: '商品退换货', + icon: 'my/huan.svg', + path: '/pages/shouye/danye?advert=29', + handler: this.navigateToPath.bind(this) + }; for (let i = 0; i < baseMenuList.length; i++) { let menu = baseMenuList[i]; if (menu.id == 3) { @@ -224,7 +232,9 @@ class AppPlatform extends BasePlatform { } } else { menuList.push(menu); - + } + if(menu.title=="用户协议"){ + menuList.push(customServiceMenu); } } // 添加App特有的菜单项 @@ -236,7 +246,6 @@ class AppPlatform extends BasePlatform { path: '', handler: this.handleCheckUpdate.bind(this) }]; - // 返回合并后的菜单列表 return menuList; } @@ -339,10 +348,10 @@ class AppPlatform extends BasePlatform { }); } getUserAgreement() { - navigateTo('/pages/guize/guize', { type: 30 }) - } - getPrivacyAgreement() { - navigateTo('/pages/guize/guize', { type: 31 }) - } + navigateTo('/pages/guize/guize', { type: 30 }) + } + getPrivacyAgreement() { + navigateTo('/pages/guize/guize', { type: 31 }) + } } export default AppPlatform; \ No newline at end of file diff --git a/common/platform/BasePlatform.js b/common/platform/BasePlatform.js index 0a4579c..f597d16 100644 --- a/common/platform/BasePlatform.js +++ b/common/platform/BasePlatform.js @@ -172,6 +172,15 @@ class BasePlatform { handler: this.handleLogout.bind(this) }) } + const customServiceMenu = { + id: 10, + show: true, + title: '关于', + icon: 'my/about.png', + path: '/pages/other/about', + handler: this.navigateToPath.bind(this) + }; + m.push(customServiceMenu); return m; } diff --git a/common/platform/MiniProgramPlatform.js b/common/platform/MiniProgramPlatform.js index b1a884d..7f768fd 100644 --- a/common/platform/MiniProgramPlatform.js +++ b/common/platform/MiniProgramPlatform.js @@ -276,5 +276,20 @@ class MiniProgramPlatform extends BasePlatform { // 将客服菜单插入到第二个位置 return [...baseMenuList.slice(0, 1), customServiceMenu, ...baseMenuList.slice(1)]; } + handleLogout() { + uni.showModal({ + title: '提示', + content: '确定要退出登录吗?', + success: (res) => { + if (res.confirm) { + uni.removeStorageSync('token'); + uni.removeStorageSync('userinfo'); + uni.switchTab({ + url: '/pages/shouye/index' + }); + } + } + }); + } } export default MiniProgramPlatform; \ No newline at end of file diff --git a/common/platform/WebAppPlatform.js b/common/platform/WebAppPlatform.js index 4e2b8ce..8fb4afb 100644 --- a/common/platform/WebAppPlatform.js +++ b/common/platform/WebAppPlatform.js @@ -65,17 +65,10 @@ class WebAppPlatform extends H5Platform { const baseMenuList = super.getUserMenuList(); // 添加客服菜单项(仅微信小程序) - const customServiceMenu = { - id: 10, - show: true, - title: '关于', - icon: 'my/about.png', - path: '/pages/other/about', - handler: this.navigateToPath.bind(this) - }; + // 将客服菜单插入到第二个位置 - return [...baseMenuList.slice(0, baseMenuList.length - 1), customServiceMenu, ...baseMenuList.slice(baseMenuList.length - 1)]; + return [...baseMenuList.slice(0, baseMenuList.length - 1), ...baseMenuList.slice(baseMenuList.length - 1)]; } getVersion() { return uni.getStorageSync('version') == '' ? '1.0.0' : uni.getStorageSync('version'); diff --git a/common/server/order.js b/common/server/order.js index 4a25222..746c36e 100644 --- a/common/server/order.js +++ b/common/server/order.js @@ -46,4 +46,15 @@ export const getOrderUrlLink = async (order_num) => { order_num: order_num }, true); return res; -} \ No newline at end of file +} +//get_user_test +/** + * 获取账号token + * @param {*} user_id + * @returns + */ +export const getUserTest = async (user_id) => { + const res = await RequestManager.post('/get_user_test', { user_id: user_id }, true); + return res; +} + diff --git a/manifest.json b/manifest.json index c1a641b..38a2b8d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,12 +1,18 @@ { "name" : "友达赏", - "appid" : "__UNI__2E6CB39", + "appid" : "__UNI__0BC0425", "description" : "", "versionName" : "1.0.4", "versionCode" : 104, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { + "optimization" : { + "js" : { + "obfuscation" : true, // 开启代码混淆 + "compress" : true // 开启代码压缩 + } + }, "compatible" : { "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 }, @@ -126,8 +132,9 @@ } }, "uniStatistics" : { - "enable" : true - } + "enable" : false + }, + "nvueCompiler" : "uni-app" }, /* 快应用特有相关 */ "quickapp" : {}, diff --git a/pages.json b/pages.json index c727979..473f382 100644 --- a/pages.json +++ b/pages.json @@ -150,6 +150,12 @@ "navigationStyle": "custom" } }, + { + "path": "pages/user/bi_jl", + "style": { + "navigationStyle": "custom" + } + }, { "path": "pages/user/wuliu_detail", "style": { @@ -353,6 +359,12 @@ "style": { "navigationStyle": "custom" } + }, + { + "path": "pages/user/yetx", + "style": { + "navigationStyle": "custom" + } } ], "subPackages": [{ diff --git a/pages/other/about.vue b/pages/other/about.vue index b5419e5..ce5eadc 100644 --- a/pages/other/about.vue +++ b/pages/other/about.vue @@ -5,8 +5,8 @@ @click="handleIconClick"> 友达赏 - Version:{{version}} - + Version:{{ version }} + @@ -30,12 +30,16 @@ 日志状态: {{ logEnabled ? '已开启' : '已关闭' }} + + + + @@ -47,7 +51,7 @@ + + \ No newline at end of file