diff --git a/common/commonJS.js b/common/commonJS.js new file mode 100644 index 0000000..3307e75 --- /dev/null +++ b/common/commonJS.js @@ -0,0 +1,142 @@ + +import uniCopy from '@/js_sdk/xb-copy/uni-copy.js' +import $http from '@/config/requestConfig' +import { mapState, mapMutations } from "vuex"; + +export default { + ...mapMutations(["setUserInfo"]), + + showToast(title, icon) { + return uni.showToast({ + title: title, + icon: icon ? icon : 'none' + }) + }, + //拨打电话 + handleMakingPhoneCalls(value, title) { + uni.showModal({ + title: title ? title : '联系我们', + content: value, + confirmText: '确认', + success(res) { + if (res.confirm) { + uni.makePhoneCall({ + phoneNumber: value, //电话号码 + success: function (e) { + console.log(e); + }, + fail: function (e) { + console.log(e); + } + }) + } + } + }) + }, + //复制内容 + handleCopy(value, title) { + uniCopy({ + content: value, + success: (res) => { + uni.showToast({ + title: title + '复制成功', + icon: 'none' + }) + }, + error: (e) => { + + } + }) + }, + + //用户协议 + async getAgreement(id) { + console.log('id at line 56:', id) + var data = { + id: id + } + var result = { + title:'', + content:'' + } + await $http + .request({ + url: "sys/agreement/getAgreement", + method: "POST", + data: data, + header: { + "Content-Type": "application/json", + }, + }).then((res) => { + console.log('res at line 111:', res) + if (res.code == 0) { + result = res.agreement + } + + }) + return result + }, + async getCheckCourseStatus(data) { + var result + await $http + .post('app/phone.do?getCheckCourseStatus', { + customerType + : + "D", + token + : uni.getStorageSync("token") + , + customerOid + : uni.getStorageSync("customerOid"), + oid: data.oid + }) + .then(async res => { + result = res.obj + }) + return result + }, + // 退出登录 + signOut() { + uni.showModal({ + title: "提示", + content: "确定要退出当前账户吗?", + success: function (res) { + if (res.confirm) { + setUserInfo({ token: null }); + uni.reLaunch({ + url: "/pages/user/login", + }); + } else if (res.cancel) { + // 取消操作 + } + }, + }); + }, + // 注销账户 + logout() { + let that = this; + uni.showModal({ + title: "提示", + content: "确定要注销当前账户吗?", + success: function (res) { + if (res.confirm) { + uni.showModal({ + title: "提示", + showCancel: false, + content: `注销申请已提交成功,请联系客服进行后续操作:022-24142321`, + success: function (res1) { + if (res1.confirm) { + that.signOut(); + } + }, + }); + } else if (res.cancel) { + // 取消操作 + } + }, + }); + }, + + +} + diff --git a/config/baseUrl.js b/config/baseUrl.js index 699e812..913a4c6 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -2,12 +2,12 @@ let baseUrl = ""; let socketUrl = ""; if (process.env.NODE_ENV === 'development') { //开发环境 - //baseUrl = "https://api.nuttyreading.com/"; // 线上正式 - baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 + baseUrl = "https://api.nuttyreading.com/"; // 线上正式 + //baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 } else if (process.env.NODE_ENV === 'production') { //生产环境 - //baseUrl = "https://api.nuttyreading.com/"; - baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 + baseUrl = "https://api.nuttyreading.com/"; + //baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 } const courtConfig = { //微信公众号APPID diff --git a/main.js b/main.js index b1587f3..1535ac2 100644 --- a/main.js +++ b/main.js @@ -16,8 +16,8 @@ import { Vue.prototype.$getHours = nowHour // 地址 -Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" -//Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" +//Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" +Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" // 安卓安卓包下载地址 // Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址 @@ -59,6 +59,10 @@ Vue.prototype.$base = base; //挂载全局http请求 import $http from '@/config/requestConfig' Vue.prototype.$http = $http; + +import commonJS from '@/common/commonJS.js' +Vue.prototype.$commonJS = commonJS + // #ifdef MP-WEIXIN //挂载全局微信分享 import { @@ -87,6 +91,8 @@ import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue' Vue.component('common-coupon', commonCoupon); import commonList from '@/pages/component/commonComponents/list.vue' Vue.component('common-list', commonList); +import commonGoodsNav from '@/pages/component/commonComponents/goodsNav.vue' +Vue.component('common-goods-nav', commonGoodsNav); import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue' Vue.component('common-advertisement', commonAdvertisement); diff --git a/manifest.json b/manifest.json index 8b8003b..29fe891 100644 --- a/manifest.json +++ b/manifest.json @@ -12,8 +12,8 @@ "src" : "图片路径" } ], - "versionName" : "1.2.71", - "versionCode" : 1271, + "versionName" : "1.2.72", + "versionCode" : 1272, "app-plus" : { "compatible" : { "ignoreVersion" : true diff --git a/pages.json b/pages.json index b94e0c0..9b5b9c1 100644 --- a/pages.json +++ b/pages.json @@ -164,6 +164,13 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/detail/orderLCont", + "style": { + "navigationBarTitleText": "订单详情", + "enablePullDownRefresh": false + } + }, { "path": "pages/user/bindPhone", "style": { diff --git a/pages/component/commonComponents/goodsNav.vue b/pages/component/commonComponents/goodsNav.vue new file mode 100644 index 0000000..4cb2c83 --- /dev/null +++ b/pages/component/commonComponents/goodsNav.vue @@ -0,0 +1,97 @@ + + + + + \ No newline at end of file diff --git a/pages/detail/orderLCont.vue b/pages/detail/orderLCont.vue new file mode 100644 index 0000000..b985bc1 --- /dev/null +++ b/pages/detail/orderLCont.vue @@ -0,0 +1,1254 @@ + + + + + diff --git a/pages/user/persCount.vue b/pages/user/persCount.vue index b08eb50..16b8980 100644 --- a/pages/user/persCount.vue +++ b/pages/user/persCount.vue @@ -33,7 +33,7 @@ 充值消费记录 - + {{item.orderType}} @@ -225,6 +225,14 @@ }, //方法 methods: { + //列表跳转到详情 + goClick(data){ + if(data.relationId){ + uni.navigateTo({ + url: "/pages/detail/orderLCont?orderId=" + data.relationId + }); + } + }, // 获取 getData() { if(!this.iosHide){ @@ -356,10 +364,9 @@ display: inline-block; } } - - - - + .AC_List:last-child{ + border-bottom: 0; + } } .couponList { diff --git a/static/icon/pay_3.png b/static/icon/pay_3.png new file mode 100644 index 0000000..9a0b1b5 Binary files /dev/null and b/static/icon/pay_3.png differ