diff --git a/litemall-wx/.gitignore b/litemall-wx/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..14ea590c816e52f41801770b5ef0be21624f726e
--- /dev/null
+++ b/litemall-wx/.gitignore
@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/
diff --git a/litemall-wx/app.json b/litemall-wx/app.json
index ae996af9096c5a82153fdf9f8b28212b238da43c..abc84d59846f02656732a960d559d39014964204 100644
--- a/litemall-wx/app.json
+++ b/litemall-wx/app.json
@@ -1,7 +1,7 @@
{
"pages": [
- "pages/index/index",
"pages/catalog/catalog",
+ "pages/index/index",
"pages/newGoods/newGoods",
"pages/hotGoods/hotGoods",
"pages/ucenter/index/index",
diff --git a/litemall-wx/config/api.js b/litemall-wx/config/api.js
index 3d9ebbfc445f523fda81b3e022b7aea6b562f9b4..ede8cfb6c570507699bd71e8275bfc9d583c1a50 100644
--- a/litemall-wx/config/api.js
+++ b/litemall-wx/config/api.js
@@ -1,10 +1,10 @@
// 以下是业务服务器API地址
// 本机开发时使用
-var WxApiRoot = 'http://localhost:8080/wx/';
+var WxApiRoot = 'http://101.34.188.42:8082/light/wx/';
// 局域网测试使用
// var WxApiRoot = 'http://192.168.1.3:8080/wx/';
// 云平台部署时使用
-// var WxApiRoot = 'http://122.51.199.160:8080/wx/';
+// var WxApiRoot = 'http://101.34.188.42:8080/wx/';
// 云平台上线时使用
// var WxApiRoot = 'https://www.menethil.com.cn/wx/';
diff --git a/litemall-wx/lib/vant-weapp/action-sheet/index.js b/litemall-wx/lib/vant-weapp/action-sheet/index.js
index 8065c833cd0516d1323509d1533ee281992c3604..58e866d9588843db4c961c8ca4112b8da7124a14 100644
--- a/litemall-wx/lib/vant-weapp/action-sheet/index.js
+++ b/litemall-wx/lib/vant-weapp/action-sheet/index.js
@@ -1,5 +1,7 @@
import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
VantComponent({
+ mixins: [button],
props: {
show: Boolean,
title: String,
@@ -7,42 +9,51 @@ VantComponent({
description: String,
round: {
type: Boolean,
- value: true
+ value: true,
},
zIndex: {
type: Number,
- value: 100
+ value: 100,
},
actions: {
type: Array,
- value: []
+ value: [],
},
overlay: {
type: Boolean,
- value: true
+ value: true,
},
closeOnClickOverlay: {
type: Boolean,
- value: true
+ value: true,
},
closeOnClickAction: {
type: Boolean,
- value: true
+ value: true,
},
safeAreaInsetBottom: {
type: Boolean,
- value: true
- }
+ value: true,
+ },
},
methods: {
onSelect(event) {
const { index } = event.currentTarget.dataset;
- const item = this.data.actions[index];
- if (item && !item.disabled && !item.loading) {
+ const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;
+ const item = actions[index];
+ if (item) {
this.$emit('select', item);
- if (this.data.closeOnClickAction) {
+ if (closeOnClickAction) {
this.onClose();
}
+ if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
+ wx.getUserProfile({
+ desc: item.getUserProfileDesc || ' ',
+ complete: (userProfile) => {
+ this.$emit('getuserinfo', userProfile);
+ },
+ });
+ }
}
},
onCancel() {
@@ -54,6 +65,6 @@ VantComponent({
onClickOverlay() {
this.$emit('click-overlay');
this.onClose();
- }
- }
+ },
+ },
});
diff --git a/litemall-wx/lib/vant-weapp/action-sheet/index.wxml b/litemall-wx/lib/vant-weapp/action-sheet/index.wxml
index bed9b06b4402c7873609dca9c21a411ba1360813..b04cc3a3dc36fcf8f7521be7b84ee7cc2aca70cb 100644
--- a/litemall-wx/lib/vant-weapp/action-sheet/index.wxml
+++ b/litemall-wx/lib/vant-weapp/action-sheet/index.wxml
@@ -11,15 +11,15 @@
close-on-click-overlay="{{ closeOnClickOverlay }}"
bind:close="onClickOverlay"
>
-