diff --git a/.gitignore b/.gitignore
index 18515c4..2fb12a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.hbuilderx/
.history/
+env.js
node_moudel/
package-lock.json
unpackage/dist/build/.automator/
diff --git a/build/build.js b/build/build.js
new file mode 100644
index 0000000..e69de29
diff --git a/build/env.config.js b/build/env.config.js
new file mode 100644
index 0000000..031de36
--- /dev/null
+++ b/build/env.config.js
@@ -0,0 +1,45 @@
+/*
+ * @Author: ch
+ * @Date: 2022-05-05 14:40:00
+ * @LastEditors: ch
+ * @LastEditTime: 2022-05-05 18:07:18
+ * @Description: 根据git分支生成对应环境的环境变量
+ * 开发时如果环境变量换了,可以不用重启服务,直接运行node env.config.js即可
+ */
+const fs = require('fs');
+const path = require('path');
+const getRepoInfo = require('git-repo-info');
+
+const envConfig = {
+ dev : {
+ base_url: 'dev'
+ },
+ test : {
+ base_url: 'xxx'
+ },
+ reslese : {
+ base_url: 'xxx'
+ },
+ prod : {
+ base_url: 'xxx'
+ }
+}
+const branch = getRepoInfo().branch; // 调用获取git信息
+let curEnvConfig = {};
+switch (branch){
+ case 'msb_test':
+ curEnvConfig = envConfig.test;
+ break;
+ case 'msb_beta':
+ curEnvConfig = envConfig.release;
+ break;
+ case 'msb_prod':
+ curEnvConfig = envConfig.prod;
+ break;
+ default:
+ curEnvConfig = envConfig.dev;
+ break;
+
+}
+fs.writeFileSync(`${path.resolve(__dirname, '../common/config')}/env.js`,
+ `const ENV = ${JSON.stringify(curEnvConfig)}; export default ENV;`);
diff --git a/common/utils/requset.js b/common/utils/requset.js
index a0a3634..8c7cc6e 100644
--- a/common/utils/requset.js
+++ b/common/utils/requset.js
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
- * @LastEditTime: 2022-05-05 16:22:30
+ * @LastEditTime: 2022-05-05 19:00:38
* @Description: 项目接口请求统一处理器,返回一个需要token和不需要token的请求封装方法
*/
diff --git a/common/utils/wxpay.js b/common/utils/wxpay.js
index da6c650..3f8f5e1 100644
--- a/common/utils/wxpay.js
+++ b/common/utils/wxpay.js
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-29 14:26:10
* @LastEditors: ch
- * @LastEditTime: 2022-05-05 11:26:35
+ * @LastEditTime: 2022-05-05 19:16:29
* @Description: file content
*/
@@ -35,7 +35,7 @@ export const Wxpay = async ({orderId,openId})=>{
}, res => {
if(res.err_msg !== 'get_brand_wcpay_request:cancel'){
uni.navigateTo({
- url : `/payResult?orderId=${orderId}`
+ url : `/payResult?orderId=${orderId}&payType=wxjsapi`
});
}
})
@@ -46,7 +46,7 @@ export const Wxpay = async ({orderId,openId})=>{
uni.$u.toast(error.message);
return false;
}
- const redirect_url = decodeURIComponent(`https://you-app.mashibing.com/payResult?orderId=${orderId}`);
+ const redirect_url = decodeURIComponent(`https://you-app.mashibing.com/payResult?orderId=${orderId}&payType=wxh5`);
window.location.href = `${result.dataInfo.payUrl}&redirect_url=${redirect_url}`;
}
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 53a8115..43a3529 100644
--- a/index.html
+++ b/index.html
@@ -1,3 +1,10 @@
+
@@ -14,7 +21,6 @@
- sdfadsfasd
diff --git a/package.json b/package.json
index 28370f4..a935eb2 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"vuex": "^3.6.2"
},
"devDependencies": {
- "@dcloudio/uni-helper-json": "^1.0.13"
+ "@dcloudio/uni-helper-json": "^1.0.13",
+ "git-repo-info": "^2.1.1"
}
}
diff --git a/pages/goods/detail/index.vue b/pages/goods/detail/index.vue
index 912ab8a..1d8d11f 100644
--- a/pages/goods/detail/index.vue
+++ b/pages/goods/detail/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
- * @LastEditTime: 2022-05-05 16:14:29
+ * @LastEditTime: 2022-05-05 17:19:09
* @Description: file content
-->
@@ -205,8 +205,10 @@ page {
padding: 20rpx;
}
.footer{
- height: 206rpx;
- padding: 0 30rpx 68rpx 30rpx;
+ padding: 30rpx;
+ padding-bottom: calc(constant(safe-area-inset-bottom) + 50rpx) ;
+ padding-bottom: calc(env(safe-area-inset-bottom) + 50rpx);
+ // box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
@@ -214,8 +216,6 @@ page {
bottom: 0;
left: 0;
right: 0;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
background: $color-grey0;
@@ -228,7 +228,9 @@ page {
color: $color-grey0;
text-align: center;
position: fixed;
- bottom: 206rpx;
+ z-index: 9;
+ bottom: calc(180rpx + constant(safe-area-inset-bottom)) ;
+ bottom: calc(180rpx + env(safe-area-inset-bottom));
}
&--left{
display: flex;
diff --git a/pages/index/components/Banner.vue b/pages/index/components/Banner.vue
index 874cfea..1846115 100644
--- a/pages/index/components/Banner.vue
+++ b/pages/index/components/Banner.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:31:12
* @LastEditors: ch
- * @LastEditTime: 2022-04-30 19:30:49
+ * @LastEditTime: 2022-05-05 18:37:20
* @Description: file content
-->
@@ -63,7 +63,7 @@ export default {
top:-2rpx;
height: 231rpx;
width: 110vw;
- background: $color-blue5;
+ background: #F3574D;
border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%;
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 9985928..9bd0324 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
- * @LastEditTime: 2022-05-05 10:52:47
+ * @LastEditTime: 2022-05-05 18:42:34
* @Description: file content
-->
@@ -33,10 +33,10 @@
- 为您甄选
+ 甄选推荐
- 为您推荐
+ 为您精选
@@ -142,7 +142,7 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
- background: $color-blue5;
+ background: #F3574D;
}
.logo{
width: 265rpx;
@@ -170,7 +170,7 @@ page {
}
.search{
padding: 5rpx 30rpx 0;
- background: $color-blue5;
+ background: #F3574D;
&__min{
width: 548rpx;
padding: 0;
diff --git a/pages/order/payResult.vue b/pages/order/payResult.vue
index 6f04b49..1d2b73e 100644
--- a/pages/order/payResult.vue
+++ b/pages/order/payResult.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-28 15:01:41
* @LastEditors: ch
- * @LastEditTime: 2022-05-05 11:34:39
+ * @LastEditTime: 2022-05-05 19:18:30
* @Description: file content
-->
@@ -29,7 +29,7 @@
支付失败
请重新试试
- 返回商品详情
+ 返 回
@@ -66,6 +66,14 @@ export default {
}
this.orderInfo = result;
uni.setNavigationBarTitle({title:result.isSuccess ? '支付成功' : '支付失败'});
+ },
+ back(){
+ const payType = this.$Route.query.payType;
+ if(payType === 'wxh5'){
+ this.$Router.back(2);
+ }else{
+ this.$Router.back();
+ }
}
}
diff --git a/static/index/logo.png b/static/index/logo.png
index 7357803..d9d78c9 100644
Binary files a/static/index/logo.png and b/static/index/logo.png differ
diff --git a/unpackage/dist/build/h5/static/img/logo.c66e030d.png b/static/index/logo3.png
similarity index 100%
rename from unpackage/dist/build/h5/static/img/logo.c66e030d.png
rename to static/index/logo3.png
diff --git a/unpackage/dist/build/h5/index.html b/unpackage/dist/build/h5/index.html
index 1eea2e2..814b421 100644
--- a/unpackage/dist/build/h5/index.html
+++ b/unpackage/dist/build/h5/index.html
@@ -1,2 +1,2 @@
马士兵严选
\ No newline at end of file
+ document.write('')