liudan 1 year ago
parent e03e8ee0b1
commit ea49140857
  1. 50
      pages/home/home.vue
  2. 31
      pages/login/login.vue
  3. 2
      pages/warehouse/weituo.vue
  4. 2
      unpackage/dist/build/h5/index.html
  5. 2
      unpackage/dist/build/h5/static/js/index.3cf2361b.js
  6. 2
      unpackage/dist/build/h5/static/js/pages-AddressEdit-AddressEdit.b35897e1.js
  7. 1
      unpackage/dist/build/h5/static/js/pages-home-home.0cfad50f.js
  8. 1
      unpackage/dist/build/h5/static/js/pages-home-home.359ed517.js
  9. 1
      unpackage/dist/build/h5/static/js/pages-login-login.11e68abd.js
  10. 1
      unpackage/dist/build/h5/static/js/pages-login-login.c21fc09a.js
  11. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-weituo.be81a90a.js
  12. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-weituo.ee6fc436.js

@ -140,7 +140,7 @@ export default {
// #endif // #endif
}, },
onLoad() { onLoad() {
// this.H5Login() this.H5Login()
}, },
onPageScroll(e){ onPageScroll(e){
let scrollTop = e.scrollTop; let scrollTop = e.scrollTop;
@ -208,32 +208,32 @@ export default {
break; break;
} }
}, },
// getQueryString(name) { getQueryString(name) {
// let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
// let r = window.location.search.substr(1).match(reg); let r = window.location.search.substr(1).match(reg);
// if (r !== null) return unescape(r[2]); if (r !== null) return unescape(r[2]);
// return null; return null;
// }, },
// H5Login(){ H5Login(){
// let pageUrl = window.location.href; let pageUrl = window.location.href;
// let code =this.getQueryString('code'); let code =this.getQueryString('code');
// console.log(code,"lldd"); console.log(code,"lldd");
// let appid="wx5a2c9f7e82918b85" let appid="wx5a2c9f7e82918b85"
// let redirect_uri = encodeURIComponent(pageUrl); let redirect_uri = encodeURIComponent(pageUrl);
// // let redirect_uri = pageUrl; // let redirect_uri = pageUrl;
// console.log(redirect_uri) console.log(redirect_uri)
// let authUrl = let authUrl =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect`; `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect`;
// if (code) { if (code) {
// uni.setStorageSync("code",code) uni.setStorageSync("code",code)
// } else { } else {
// // window.location.href = authUrl; // window.location.href = authUrl;
// console.log("code") console.log("没有code")
// // return await Promise.reject(""); // return await Promise.reject("");
// } }
// } }
} }
}; };
</script> </script>

@ -109,24 +109,6 @@ export default {
}) })
return; return;
} }
let pageUrl = window.location.href;
let code =this.getQueryString('code');
console.log(code,"lldd");
let appid="wx5a2c9f7e82918b85"
let redirect_uri = encodeURIComponent(pageUrl);
// let redirect_uri = pageUrl;
console.log(redirect_uri)
let authUrl =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect`;
if (code) {
uni.setStorageSync("code",code)
} else {
window.location.href = authUrl;
console.log("没有code")
// return await Promise.reject("");
}
loginApi({account:this.form.phone,password:this.form.password,code:uni.getStorageSync("code")}).then(res=>{ loginApi({account:this.form.phone,password:this.form.password,code:uni.getStorageSync("code")}).then(res=>{
if(res.code==1){ if(res.code==1){
setUserInfo(res.data.userinfo) setUserInfo(res.data.userinfo)
@ -135,6 +117,19 @@ export default {
url: '/pages/my/my' url: '/pages/my/my'
}); });
}else{
let pageUrl = window.location.href;
let code =this.getQueryString('code');
console.log(code,"lldd");
let appid="wx5a2c9f7e82918b85"
let redirect_uri = encodeURIComponent(pageUrl);
// let redirect_uri = pageUrl;
console.log(redirect_uri)
let authUrl =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect`;
window.location.href = authUrl;
} }
}) })
}, },

@ -129,7 +129,7 @@
payUpGoods(params).then(res=>{ payUpGoods(params).then(res=>{
let self = this; let self = this;
jweixin.config({ jweixin.config({
debug: true, // ,apialertpclogpc debug: false, // ,apialertpclogpc
appId: res.data.pay_data.appId, // appId: res.data.pay_data.appId, //
timestamp: res.data.pay_data.timeStamp, // timestamp: res.data.pay_data.timeStamp, //
nonceStr: res.data.pay_data.nonceStr, // nonceStr: res.data.pay_data.nonceStr, //

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c321b385.js></script><script src=/static/js/index.8622b5b7.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c321b385.js></script><script src=/static/js/index.3cf2361b.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save