diff --git a/common/http.api.js b/common/http.api.js index 747d5d1..15799c5 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -44,7 +44,7 @@ const install = (Vue, vm) => { let tjfk = (params={})=>vm.$u.post('index.php/api/order/payment_voucher', params);//提交付款凭证 let getCode = (id)=>vm.$u.get(`/index.php/api/login/getnum/type/mobphone/to/${id}`);//获取注册码 let register = (params={})=>vm.$u.post('/index.php/api/login/reg', params);//注册 - let getCodeRepass = (id)=>vm.$u.get(`/index.php/api/login/getpwdnum/type/mobphone/to/${id}`);//获取验证码 + let getCodeRepass = (id,params)=>vm.$u.get(`/index.php/api/login/getpwdnum/type/mobphone/to/${id}`,params);//获取验证码 let changepwd = ( params)=>vm.$u.post(`/index.php/api/login/changepwd`, params);//修改密码 vm.$u.api = { diff --git a/pages.json b/pages.json index 3c96a32..50a4794 100644 --- a/pages.json +++ b/pages.json @@ -152,6 +152,15 @@ "backgroundColorTop":"#f3f3f3", "backgroundColorBottom":"#ffffff" } + },{ + "path" : "pages/user/order_list/orderDetail", + "style" : { + "enablePullDownRefresh": true, + "navigationBarTitleText":"订单详情", + "navigationBarBackgroundColor":"#f8f8f8", + "backgroundColorTop":"#f3f3f3", + "backgroundColorBottom":"#ffffff" + } } ,{ "path" : "pages/user/setting/setting", diff --git a/pages/login/register.vue b/pages/login/register.vue index 1ca13cb..bd3cbdf 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -17,7 +17,7 @@ - + 立即注册 @@ -36,7 +36,7 @@ phoneNumber:"", userName:"", code:'', - passwd:"", + password:"", getCodeText:'获取验证码', getCodeBtnColor:"#ffffff", getCodeisWaiting:false @@ -103,38 +103,24 @@ }) uni.login({ provider: 'weixin', - success: function (loginRes) { - let params = {username:that.userName,mobphone:that.phoneNumber,code:loginRes.code,phone_code:that.code}; - that.$u.api.register(params).then(res=>{ + success: function (wxLoginRes) { + let params = {username:that.userName,mobphone:that.phoneNumber,code:wxLoginRes.code,phone_code:that.code,password:that.password}; + that.$u.api.register(params).then(registerRes=>{ uni.hideLoading(); debugger; - if(res.code===0){ - uni.reLaunch({ - url:'/pages/tabBar/home/home' - }) - that.$u.vuex('vuex_token', res.data.token) - that.$u.api.getInfo().then(res => { - that.$u.vuex('vuex_user', res.data) - if(res.data.icon===""){ - that.$u.vuex('vuex_user.icon', '/static/img/face.jpg') - }else{ - that.$u.vuex('vuex_user.icon', that.vuex_host + 'public/' + res.data.icon) - } - }) + if(registerRes.code===0){ + that.toLogin(); }else{} - console.log(res) - }) }, }) - //模板示例把用户注册信息储存在本地,实际使用中请替换为上传服务器。 // setTimeout(()=>{ // uni.getStorage({ // key: 'UserList', // success:(res)=>{ // //增加记录,密码md5 - // res.data.push({username:this.phoneNumber,passwd:md5(this.passwd)}) + // res.data.push({username:this.phoneNumber,password:md5(this.password)}) // uni.setStorage({ // key: 'UserList', // data: res.data, @@ -153,7 +139,7 @@ // //新建UserList // uni.setStorage({ // key: 'UserList', - // data: [{username:this.phoneNumber,passwd:md5(this.passwd)}], + // data: [{username:this.phoneNumber,password:md5(this.password)}], // success: function () { // uni.hideLoading() // uni.showToast({title: '注册成功',icon:"success"}); diff --git a/pages/login/resetpasswd.vue b/pages/login/resetpasswd.vue index eb55439..a0c623d 100644 --- a/pages/login/resetpasswd.vue +++ b/pages/login/resetpasswd.vue @@ -96,56 +96,43 @@ uni.hideLoading(); debugger; if(res.code===0){ - uni.reLaunch({ - url:'/pages/tabBar/home/home' - }) - that.$u.vuex('vuex_token', res.data.token) - that.$u.api.getInfo().then(res => { - that.$u.vuex('vuex_user', res.data) - if(res.data.icon===""){ - that.$u.vuex('vuex_user.icon', '/static/img/face.jpg') - }else{ - that.$u.vuex('vuex_user.icon', that.vuex_host + 'public/' + res.data.icon) - } - }) + that.toLogin(); }else{} - console.log(res) - }) //模板示例修改本地储存的用户信息,实际使用中请替换为上传服务器修改。 - setTimeout(()=>{ - uni.getStorage({ - key: 'UserList', - success: (res)=>{ - uni.hideLoading() - for(let i in res.data){ - let row = res.data[i]; - if(row.username==this.phoneNumber){ - //修改记录,密码md5 - res.data[i].passwd = md5(this.passwd); - uni.setStorage({ - key: 'UserList', - data: res.data, - success: function () { - uni.showToast({title: '密码已重置',icon:"success"}); - setTimeout(()=>{ - uni.navigateBack(); - },1000) - } - }); - return ; - } - } - uni.showToast({title: '手机号码未注册',icon:"none"}); + // setTimeout(()=>{ + // uni.getStorage({ + // key: 'UserList', + // success: (res)=>{ + // uni.hideLoading() + // for(let i in res.data){ + // let row = res.data[i]; + // if(row.username==this.phoneNumber){ + // //修改记录,密码md5 + // res.data[i].passwd = md5(this.passwd); + // uni.setStorage({ + // key: 'UserList', + // data: res.data, + // success: function () { + // uni.showToast({title: '密码已重置',icon:"success"}); + // setTimeout(()=>{ + // uni.navigateBack(); + // },1000) + // } + // }); + // return ; + // } + // } + // uni.showToast({title: '手机号码未注册',icon:"none"}); - }, - fail:function(e){ - uni.hideLoading() - uni.showToast({title: '手机号码未注册',icon:"none"}); - } - }); - },1000) + // }, + // fail:function(e){ + // uni.hideLoading() + // uni.showToast({title: '手机号码未注册',icon:"none"}); + // } + // }); + // },1000) } diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index 8c413c9..b674352 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -84,7 +84,6 @@ {{row.text}} - 修改密码 @@ -206,11 +205,6 @@ } }, - changePwd(){ - uni.navigateTo({ - url:'/pages/login/login' - }) - }, toMyQR(){ uni.navigateTo({ url:'../../user/myQR/myQR' diff --git a/pages/user/order_list/orderDetail.vue b/pages/user/order_list/orderDetail.vue new file mode 100644 index 0000000..643c608 --- /dev/null +++ b/pages/user/order_list/orderDetail.vue @@ -0,0 +1,436 @@ + + + + + + diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue index fd0fe66..631759c 100644 --- a/pages/user/order_list/order_list.vue +++ b/pages/user/order_list/order_list.vue @@ -21,13 +21,13 @@ 不开票 普票 - + (已开) + (待开) 专票 - + (已开) + (待开) @@ -39,7 +39,7 @@ - + @@ -56,12 +56,13 @@ - 收货人:{{row.linkman}} {{row.telphone}} {{row.address}} - 订单号:{{row.order_sn}}|{{row.create_time}} + + 收货人:{{row.linkman}} {{row.telphone}} + - + 取消订单 上传付款凭证 @@ -325,6 +326,23 @@ } }) },500) + }, + orderDetail(row,index){ + uni.showLoading({ + title:'正在获取订单...' + }) + setTimeout(()=>{ + uni.setStorage({ + key:'orderDetail', + data:JSON.stringify(this.list[index]), + success: () => { + uni.hideLoading(); + uni.navigateTo({ + url:'./orderDetail' + }) + } + }) + },500) } } }