fuwei 5 лет назад
Родитель
Сommit
0ec2e45ac6

+ 1 - 1
ghs/src/App.vue

@@ -20,7 +20,7 @@
 			wxLoginFn()
 				.then(res => {
 					//花店员工和未知身份可以访问的地址
-					var urlArr = ['admin/shopAdmin/bind', 'pagesClient/official'];
+					var urlArr = ['admin/shopAdmin/bind', 'pagesClient/official','pagesClient/member/bind'];
 					var redirectPage = res.redirectPage;
 					var needRedirect = true;
 					urlArr.forEach((item, index, array) => {

+ 13 - 8
ghs/src/components/module/dorpdownSelect.vue

@@ -35,7 +35,7 @@
                         <picker
                             class="admin-button-com mini-btn default custom"
                                 mode="date" :value="selectItemId" @change="endTimeFn">
-                            <div v-if="selectItemId&&formatSelect(selectItemId)">{{ selectItemId }}</div>
+                            <div v-if="selectItemId&&formatSelect">{{ selectItemId }}</div>
                             <div class="tui-placeholder" v-else>自定义时间</div>
                         </picker>
                     </view>
@@ -61,7 +61,7 @@
                 default: ()=>({
                     title:'时间',
                     titleChild:'门店',
-                    list: [{name:'昨天'},{name:'今天'},{name:'本月'},{name:'上月'},{name:'今年'}]  
+                    list: [{name:'昨天',id:'0'},{name:'今天',id:'1'},{name:'本月',id:'2'},{name:'上月',id:'3'},{name:'今年',id:'4'}]  
                 })
             },
             // 1 是时间  2是其他
@@ -84,17 +84,22 @@
                 selectItem:'',
             }
         },
-        mounted(){
-
-        },
-        methods:{
-            formatSelect(val){
-                if(val.split('-').length>1){
+        computed:{
+            formatSelect(){
+                if(!this.$util.isEmpty(this.selectItemId)&&
+                this.$util.isString(this.selectItemId)&&
+                this.selectItemId.split('-').length>1){
                     return true
                 }else{
                     return false
                 }
             },
+        },
+        mounted(){
+
+        },
+        methods:{
+            
             switchCut(){
                 this.dropdownShow = !this.dropdownShow
             },

+ 29 - 7
ghs/src/pagesClient/member/detail.vue

@@ -17,6 +17,7 @@
             </view>
             <button 
               v-if="userInfo.isOpen === 0"
+              id="0"
               class="invite-bt" open-type="share">
               邀请开店
             </button>
@@ -51,9 +52,11 @@
                 <view>
                   {{userInfo.userName}} {{userInfo.mobile}}
                   <button
+                    id="1"
                     @click="pageTo({
                       url:'/pagesClient/member/bind'
                     })" 
+                    open-type="share"
                     class="admin-button-com default">
                     关联微信
                   </button>
@@ -157,6 +160,25 @@ export default {
     // ...mapGetters({ levelData: "getLevel" })
   },
   onLoad() {},
+  onShareAppMessage(res) {
+		if (res.target.id === "0") {
+			return  {
+          title: "更懂您的花卉宝",
+          desc: "",
+          imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
+          pagePath: "pagesClient/official/index?introMerchantId=" + this.userInfo.id
+        }
+		} else if (res.target.id === "1") {
+			return {
+				title: "关联微信",
+				desc: "",
+				imgUrl: "",
+				pagePath: "pagesClient/member/bind"
+			};
+		} else {
+			return {};
+		}
+	},
   methods: {
     async remindChangeFn(e){
       this.form.debt = e.detail.value ? 1 : 0;
@@ -188,13 +210,13 @@ export default {
         this.orderData[0].value = this.userInfo.debtAmount
         this.orderData[1].value = this.userInfo.buyNum
         this.orderData[2].value = this.userInfo.buyAmount
-        let params = {
-          title: "更懂您的花卉宝",
-          desc: "",
-          imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
-          pagePath: "pagesClient/official/index?introMerchantId=" + res.data.id
-        };
-        this.jweixinFn(params);
+        // let params = {
+        //   title: "更懂您的花卉宝",
+        //   desc: "",
+        //   imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
+        //   pagePath: "pagesClient/official/index?introMerchantId=" + res.data.id
+        // };
+        // this.jweixinFn(params);
       });
     },
     // operate ===========================