pull/1/head
liudan 1 year ago
parent 47d8961e3a
commit e53777fd38
  1. 43
      README.md
  2. 2
      common/api.js
  3. 2
      pages/MyCoupon/MyCoupon.vue
  4. 50
      pages/home/home.vue
  5. 27
      pages/login/login.vue
  6. 2
      pages/qianggou/productDetails.vue
  7. 2
      pages/register/register.vue
  8. 73
      pages/warehouse/weituo.vue
  9. 2
      unpackage/dist/build/h5/index.html
  10. 18
      unpackage/dist/build/h5/static/js/chunk-vendors.ada04ba0.js
  11. 1
      unpackage/dist/build/h5/static/js/index.2dfd34d3.js
  12. 1
      unpackage/dist/build/h5/static/js/pages-AccountSecurity-AccountSecurity.ef22e419.js
  13. 1
      unpackage/dist/build/h5/static/js/pages-AccountSecurity-AccountSecurity~pages-AddressEdit-AddressEdit~pages-ChangePassword-ChangePassw~e9040fe6.4dba93b9.js
  14. 1
      unpackage/dist/build/h5/static/js/pages-AccountSecurity-AccountSecurity~pages-AddressEdit-AddressEdit~pages-ConfirmOrder-ConfirmOrder~~3a70436b.20e49153.js
  15. 1
      unpackage/dist/build/h5/static/js/pages-AddressEdit-AddressEdit.a4d641f6.js
  16. 1
      unpackage/dist/build/h5/static/js/pages-AddressList-AddressList.9e5506b5.js
  17. 1
      unpackage/dist/build/h5/static/js/pages-ChangePassword-ChangePassword.a42536ce.js
  18. 1
      unpackage/dist/build/h5/static/js/pages-ChangePassword-ChangePassword~pages-ConfirmOrder-ConfirmOrder~pages-Information-Information~pa~5f6b18e6.24db542e.js
  19. 1
      unpackage/dist/build/h5/static/js/pages-ConfirmOrder-ConfirmOrder.d319c6af.js
  20. 1
      unpackage/dist/build/h5/static/js/pages-GoodsDetails-GoodsDetails.79eaf5bb.js
  21. 1
      unpackage/dist/build/h5/static/js/pages-GoodsEvaluateList-GoodsEvaluateList.6f99fb70.js
  22. 1
      unpackage/dist/build/h5/static/js/pages-GoodsOn-GoodsOn.318bde13.js
  23. 1
      unpackage/dist/build/h5/static/js/pages-Information-Information.f7e537f8.js
  24. 1
      unpackage/dist/build/h5/static/js/pages-Information-Information~pages-warehouse-buy.a3fa4e59.js
  25. 1
      unpackage/dist/build/h5/static/js/pages-MyCoupon-MyCoupon.05ffd2fb.js
  26. 1
      unpackage/dist/build/h5/static/js/pages-MyOrderList-MyOrderList.cb8c1de5.js
  27. 1
      unpackage/dist/build/h5/static/js/pages-OrderDetails-OrderDetails.eab592d0.js
  28. 1
      unpackage/dist/build/h5/static/js/pages-SearchGoodsList-SearchGoodsList.b267aa3d.js
  29. 1
      unpackage/dist/build/h5/static/js/pages-Setting-Setting.d15feb45.js
  30. 1
      unpackage/dist/build/h5/static/js/pages-bind-bind.104239e4.js
  31. 1
      unpackage/dist/build/h5/static/js/pages-cart-cart.88b2625a.js
  32. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-fans.bf736c1b.js
  33. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-fansOrder.9e50c1d9.js
  34. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-fenxiao.dec99024.js
  35. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-fenxiao~pages-my-my.465e47d1.js
  36. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-fenxiao~pages-my-richText~pages-qianggou-productDetails~pages-qianggou-qianggou~pages-~25a581a4.0835e830.js
  37. 1
      unpackage/dist/build/h5/static/js/pages-fenxiao-yongjin.77acbfd0.js
  38. 1
      unpackage/dist/build/h5/static/js/pages-home-home.1265f4a5.js
  39. 1
      unpackage/dist/build/h5/static/js/pages-home-home~pages-my-richText.e0de5a30.js
  40. 3
      unpackage/dist/build/h5/static/js/pages-home-sign.b653a90a.js
  41. 1
      unpackage/dist/build/h5/static/js/pages-login-login.7e9000af.js
  42. 2
      unpackage/dist/build/h5/static/js/pages-my-invite.67ee024e.js
  43. 1
      unpackage/dist/build/h5/static/js/pages-my-my.f978aff0.js
  44. 1
      unpackage/dist/build/h5/static/js/pages-my-richText.95414faf.js
  45. 1
      unpackage/dist/build/h5/static/js/pages-qianggou-productDetails.8d69500d.js
  46. 1
      unpackage/dist/build/h5/static/js/pages-qianggou-productList.e76cf8b1.js
  47. 1
      unpackage/dist/build/h5/static/js/pages-qianggou-qianggou.9154c489.js
  48. 1
      unpackage/dist/build/h5/static/js/pages-register-findPsw.8ae09774.js
  49. 1
      unpackage/dist/build/h5/static/js/pages-register-register.a701c838.js
  50. 1
      unpackage/dist/build/h5/static/js/pages-search-search.f97063fe.js
  51. 1
      unpackage/dist/build/h5/static/js/pages-shoukuan-shoukuan.57f5581a.js
  52. 1
      unpackage/dist/build/h5/static/js/pages-shouyi-shouyi.c6dfaf34.js
  53. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-buy.22e69cac.js
  54. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-pay.81d51174.js
  55. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-sell.6551fc84.js
  56. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-weituo.88c36400.js

@ -1,43 +0,0 @@
# uni-app 电商模板
自己研究开发的纯uni-app电商前端模板,会不定期更新模板内容,功能,UI界面的。
#### 如果对您有用 好评哦 (^ω^)
## 说明
1. css部分使用了uni.scss部分变量, 其他语法已剔除特殊语法, 除变量外可直接替换其他css预处理器
2. app.vue下定义了个别全局样式以及引用iconfont图标
3. 该项目为前端页面效果展示, 数据和图片来自网络,均只用于案例展示,可以删除,文件在/static/img,请勿用于其他用途。
## 版本更新说明
#### 1.0.2
1. 增加登录/注册UI界面
2. 购物车增加失效商品列表
3. 购物车细节小调整
#### 1.0.1
1. UI界面适配全面屏,异形屏。
2. 增加商品详情限时秒杀活动价格展示。
### 展示码
![image text](http://static.996ico.cn/static/picture/996shop/qr_code/h5_code.png)
**H5版本**
![image text](http://static.996ico.cn/static/picture/996shop/qr_code/app_code.png)
**APP版本(仅支持安卓请不要用微信扫码)**
### 界面展示
![image text](http://static.996ico.cn/static/picture/996shop/img/home.jpg)
![image text](http://static.996ico.cn/static/picture/996shop/img/goods.jpg)
![image text](http://static.996ico.cn/static/picture/996shop/img/show_01.png)
![image text](http://static.996ico.cn/static/picture/996shop/img/show_02.jpg)
![image text](http://static.996ico.cn/static/picture/996shop/img/show_03.jpg)
### 其他说明
- 商城可以用作搭建项目,勿做其他非法用途,切记切记!!
- UI组件部分使用ColorUI-UniApp 感谢作者 文晓港
- 如商城遇到部分问题,可以评论留言,我会都看到的

@ -57,7 +57,7 @@ export const getWarehouseList = (params, config = {custom: { auth: true }}) => h
//商品列表
export const getGoodsList = (params, config = {custom: { auth: true }}) => http.post('/api/order/getGoodsList', params, config);
//商品详情
export const getgoodsDetail = (params, config = {custom: { auth: true }}) => http.post('/api/order/goodsDetail', params, config);
export const getgoodsDetail = (params, config = {custom: { auth: true }}) => http.get('/api/order/goodsDetail', {params}, config);
//买方订单
export const getBuyerOrderList = (params, config = {custom: { auth: true }}) => http.get('/api/order/getBuyerOrderList', {params}, config);
//卖方订单

@ -80,7 +80,7 @@ export default {
userMyCoupon(item){
// if(item.status!="used"){
uni.navigateTo({
url: '/pages/warehouse/weituo?coupon_id='+item.id+'&num='+item.amount+'&coupon=1&id='+this.id
url: '/pages/warehouse/weituo?coupon_id='+item.id+'&num='+item.amount+'&coupon=1&id='+this.id+"&enough="+item.enough
})
// }

@ -140,7 +140,7 @@ export default {
// #endif
},
onLoad() {
this.H5Login()
// this.H5Login()
},
onPageScroll(e){
let scrollTop = e.scrollTop;
@ -208,32 +208,32 @@ export default {
break;
}
},
getQueryString(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r !== null) return unescape(r[2]);
return null;
},
H5Login(){
let pageUrl = window.location.href;
// getQueryString(name) {
// let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
// let r = window.location.search.substr(1).match(reg);
// if (r !== null) return unescape(r[2]);
// return null;
// },
// H5Login(){
// let pageUrl = window.location.href;
let code =this.getQueryString('code');
console.log(code,"lldd");
let appid="wx5a2c9f7e82918b85"
// 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("");
}
}
// 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("");
// }
// }
}
};
</script>

@ -109,8 +109,25 @@ export default {
})
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=>{
if(res.code==1){
setUserInfo(res.data.userinfo)
setToken(res.data.userinfo.token);
@ -120,7 +137,13 @@ export default {
}
})
}
},
getQueryString(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r !== null) return unescape(r[2]);
return null;
},
},
watch:{
form:{

@ -80,7 +80,7 @@ export default {
methods: {
getDetailsHandle(id){
getgoodsDetail({id:id}).then(res=>{
getgoodsDetail({id:id,custom: { auth: true }}).then(res=>{
this.swiperList.push({
url: res.data.image
})

@ -114,7 +114,7 @@ export default {
* 注册点击
*/
onRegister(){
userRegister({username:this.form.username,mobile:this.form.phone,code:this.form.code,password:this.form.password,invite_mobile:this.inviteMobile,code:uni.getStorageSync("code")}).then(res=>{
userRegister({username:this.form.username,mobile:this.form.phone,code:this.form.code,password:this.form.password,invite_mobile:this.inviteMobile}).then(res=>{
console.log(res,"密码")
if(res.code==1){
this.$refs.uToast.show({

@ -113,6 +113,8 @@
sxf:null,
switchValue:1,
total:0,
enough:0,
couponNumOrgin:0,
};
},
methods:{
@ -123,6 +125,32 @@
use_commission:this.switchValue,
}
payUpGoods(params).then(res=>{
if (typeof WeixinJSBridge != "undefined") {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": rea.data.pay_data.appId,
"timeStamp": rea.data.pay_data.timeStamp,
"nonceStr": rea.data.pay_data.nonceStr,
"package": rea.data.pay_data.package,
"signType": rea.data.pay_data.signType,
"paySign": rea.data.pay_data.paySign
},
function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
uni.showToast({
title:"支付成功",
icon:'none'
});
} else {
uni.showToast({
title:"支付失败",
icon:'none'
});
}
})
}
this.getOrderDetails()
})
@ -149,7 +177,14 @@
console.log(this.max)
let sxf = Number(res.data.order_amount)*(Number(this.sxfRadio)/100)
this.sxf = sxf.toFixed(2)
this.total = (Number(this.orderDetails.order_amount)+ Number(this.sxf) - Number(this.couponNum)).toFixed(2);
if(this.sxf>this.enough){
this.total = (Number(this.sxf) - Number(this.couponNum)).toFixed(2);
this.couponNum = this.couponNumOrgin
}else{
this.total = (Number(this.sxf)).toFixed(2);
this.couponNum = 0
}
})
},
sliderChange(val){
@ -159,45 +194,13 @@
this.total = (Number(this.orderDetails.order_amount)+ Number(this.sxf) - Number(this.couponNum)).toFixed(2);
},
//
async pay(pay_list) {
let that = this;
// #ifdef H5
if (typeof WeixinJSBridge != "undefined") {
return new Promise((resove, reject) => {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": "", //ID
"timeStamp": "", //1970
"nonceStr": "", //
"package": "",
"signType": "", //
"paySign": "" //
},
function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
setTimeout(() => {
resove(true)
}, 1000)
} else {
that.showToast({
title: `支付失败`
})
setTimeout(() => {
reject("支付失败")
}, 1000)
}
})
});
}
// #endif
},
},
onLoad(option) {
if(option.coupon){
this.coupon_id = option.coupon_id;
this.couponNum = Number(option.num);
this.couponNumOrgin = Number(option.num);
this.enough = Number(option.enough)
}
this.id = option.id;
this.getOrderDetails()

@ -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)'))
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.fd0c9014.js></script><script src=/static/js/index.7aa2f2f5.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.ada04ba0.js></script><script src=/static/js/index.2dfd34d3.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

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

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

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

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

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

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

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