tremble пре 5 година
родитељ
комит
078723cb72

+ 10 - 37
admins/fd-mall-backstage/WEB-INF/page/shop/brand.html

@@ -132,46 +132,15 @@
     
                 <Form-item label="店铺场景链接" prop="sceneUrl">
                     <div class="c-winput">
-                        <i-input v-model="brand.sceneUrl" placeholder="店铺场景链接"/>
+                        <i-button type="primary" @click='addSceneLink'>添加场景链接</i-button>
+                        <i-button type="primary" @click="addSceneLink">编辑场景链接</i-button>
+                        <!-- <div>{{brand.sceneUrl}}</div> -->
                     </div>
+                    <!-- <div class="c-winput">
+                        <i-input v-model="brand.sceneUrl" placeholder="店铺场景链接"/>
+                    </div> -->
                 </Form-item>
                 
-                <!-- <Form-item label="展示价格" prop="floorPrice">
-                    <Input-number :min="0" v-model="brand.floorPrice" placeholder="展示价格" style="width: 188px;"/>
-                </Form-item> -->
-                <!-- <Row>
-                    <i-col span="16">
-                        <Form-item label="封面图" prop="appListPicUrl">
-                            <i-input v-model="brand.appListPicUrl" placeholder="封面图" readonly/>
-                        </Form-item>
-                    </i-col>
-                    <i-col span="3">
-                        <Form-item :label-width="1">
-                            <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                    max-size="2048"
-                                    :on-success="handleSuccessAppListPicUrl" :on-format-error="handleFormatError"
-                                    :show-upload-list="false"
-                                    :on-exceeded-size="handleMaxSize">
-                                <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                            </Upload>
-                        </Form-item>
-                    </i-col>
-                    <i-col span="3">
-                        <Form-item :label-width="1">
-                            <i-button icon="eye" @click="eyeImageAppListPicUrl">预览图片</i-button>
-                        </Form-item>
-                    </i-col>
-                </Row> -->
-                <!-- <Form-item label="新店铺" prop="isNew">
-                    <Radio-group v-model="brand.isNew">
-                        <Radio label="1">
-                            <span>是</span>
-                        </Radio>
-                        <Radio label="0">
-                            <span>否</span>
-                        </Radio>
-                    </Radio-group>
-                </Form-item> -->
                 <Form-item label="分享图" prop="newPicUrl">
                     <div class="c-winput">
                         <i-input v-model="brand.newPicUrl" placeholder="分享图(宽高比:(5:4))" readonly/>
@@ -203,6 +172,10 @@
             </div>
         </i-form>
     </Card>
+
+    <div id="loginLayer" style="display: none;height: 100%;">
+        <iframe id="loginfdkk" src="https://www.4dkankan.com/mall_login/login.html" style="height: 100%;width:100%" frameborder="0"></iframe>
+    </div>
 </div>
 
 <script src="${rc.contextPath}/js/shop/brand.js?_${date.systemTime}"></script>

Разлика између датотеке није приказан због своје велике величине
+ 4 - 3
admins/fd-mall-backstage/index.html


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
admins/fd-mall-backstage/js/shop/brand.js


Разлика између датотеке није приказан због своје велике величине
+ 4 - 3
admins/zl-mall-backstage/index.html


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
admins/zl-mall-backstage/js/shop/brand.js


+ 9 - 2
index.html

@@ -282,6 +282,12 @@
                         <i-input v-model="newPassword" placeholder="新密码"/>
                     </div>
                 </div>
+                <div class="form-group" v-if="user.username||user.userId===1">
+                    <div class="col-sm-2 control-label">四维看看手机号</div>
+                    <div class="col-sm-10">
+                        <i-input v-model="fdkkUser" placeholder="四维看看手机号"/>
+                    </div>
+                </div>
             </div>
         </form>
     </div>
@@ -328,6 +334,7 @@
         data: {
             password: '',
             newPassword: '',
+            fdkkUser:'',
             menuList: {},
             user: {}
         },
@@ -345,11 +352,11 @@
             updatePassword: function () {
                 openWindow({
                     title: "修改密码",
-                    area: ['350px', '280px'],
+                    area: ['400px', '340px'],
                     content: jQuery("#passwordLayer"),
                     btn: ['修改', '取消'],
                     btn1: function (index) {
-                        var data = "password=" + vm.password + "&newPassword=" + vm.newPassword;
+                        var data = "password=" + vm.password + "&newPassword=" + vm.newPassword+ "&fdkkUser=" + vm.fdkkUser;
                         $.ajax({
                             type: "POST",
                             url: "sys/user/password",

+ 279 - 253
js/shop/brand.js

@@ -1,258 +1,284 @@
 $(function () {
-   var types = {
-    0:'其他',
-    1:'生活',
-    2:'文化',
-    3:'工业',
-   }
-    
-    $("#jqGrid").Grid({
-        url: '../brand/list',
-        rownumWidth:60,
-        colModel: [{
-            label: 'id', name: 'id', index: 'id', key: true, hidden: true
-        }, {
-            label: '店铺名称', name: 'name', index: 'name', width: 80
-        },
-        {
-            label: '类型', name: 'type', index: 'type', width: 80,formatter: function (value) {
-                return types[value] || '-'
-            }
-        }, 
-        {
-            label: '场景地址', name: 'sceneUrl', index: 'scene_url', width: 140
-        }, 
-        {
-            label: '店铺封面',align:'center', name: 'listPicUrl', index: 'list_pic_url', width: 120, formatter: function (value) {
-                return transImg(value,100,'auto');
-            }
-        },
-        {
-            label: '分享图', align:'center', name: 'newPicUrl', index: 'new_pic_url', width: 120, formatter: function (value) {
-                return transImg(value,100,'auto');
-            }
-        },
-        //  {
-        //     label: '描述', name: 'simpleDesc', index: 'simple_desc', width: 80
-        // }, 
-
-    
-        
-        // {
-        //     label: '缩略图', align:'center',name: 'picUrl', index: 'pic_url', width: 120, formatter: function (value) {
-        //         return transImg(value,100,'auto');
-        //     }
-        // }, 
-        {
-            label: '排序', name: 'sortOrder', index: 'sort_order', width: 80
-        }, 
-        {
-            label: '显示', name: 'isShow', index: 'is_show', width: 80, formatter: function (value) {
-                return transIsNot(value)
-            }
-        },
-        //  {
-        //     label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 80
-        // }, 
-        // {
-        //     label: '封面图',align:'center', name: 'appListPicUrl', index: 'app_list_pic_url', width: 120, formatter: function (value) {
-        //         return transImg(value,100,'auto');
-        //     }
-        // },
-        //  {
-        //     label: '新店铺', name: 'isNew', index: 'is_new', width: 80, formatter: function (value) {
-        //         return transIsNot(value)
-        //     }
-        // },
-        
-        // {
-        //     label: '新店铺排序', name: 'newSortOrder', index: 'new_sort_order', width: 80
-        // }
-    ]
-    });
-});
-
-
-const validateSceneUrlCheck = function (rule, value, callback){
-    console.log(value)
-    var link1 ='https://test.4dkankan.com/eShopMobile.html?m='
-    var link2 ='https://www.4dkankan.com/eShopMobile.html?m='
-
-    if (value === ''||!value) {
-        callback(new Error('场景地址不能为空'));
-    } else if(!~value.indexOf(link1)&&!~value.indexOf(link2)){
-        callback(new Error('场景地址需为'+link2+'或'+link1));
-    } else {
-        callback();
+    var types = {
+     0:'其他',
+     1:'生活',
+     2:'文化',
+     3:'工业',
     }
-};
-
-var vm = new Vue({
-    el: '#rrapp',
-    data: {
-        showList: true,
-        title: null,
-        brand: {listPicUrl: '',type:0, picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
-        ruleValidate: {
-            name: [
-                {required: true, message: '店铺名称不能为空', trigger: 'blur'}
-            ],
-            listPicUrl: [
-                {required: true, message: '图片不能为空', trigger: 'blur'}
-            ],
-            simpleDesc: [
-                {required: true, message: '描述不能为空', trigger: 'blur'}
-            ],
-            sceneUrl: [
-                {required: true, validator: validateSceneUrlCheck, trigger: 'blur'}
-            ],
-            picUrl: [
-                {required: true, message: '缩略图不能为空', trigger: 'blur'}
-            ]
-        },
-        q: {
-            name: '',
-            type:''
-        },
-        typeList:[
-            {
-                id:0,
-                name:'其他'
-            },
-            {
-                id:1,
-                name:'生活'
-            },
-            {
-                id:2,
-                name:'文化'
-            },
-            {
-                id:3,
-                name:'工业'
-            },
-        ]
-    },
-    methods: {
-        query: function () {
-            vm.reload();
-        },
-        add: function () {
-            vm.showList = false;
-            vm.title = "新增";
-            vm.brand = {listPicUrl: '',type:0, picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0};
-        },
-        update: function (event) {
-            var id = getSelectedRow("#jqGrid");
-            if (id == null) {
-                return;
-            }
-            vm.showList = false;
-            vm.title = "修改";
-
-            vm.getInfo(id)
-        },
-        saveOrUpdate: function (event) {
-            var url = vm.brand.id == null ? "../brand/save" : "../brand/update";
-            Ajax.request({
-                type: "POST",
-                url: url,
-                contentType: "application/json",
-                params: JSON.stringify(vm.brand),
-                successCallback: function () {
-                    alert('操作成功', function (index) {
-                        vm.reload();
-                    });
-                }
+     
+     $("#jqGrid").Grid({
+         url: '../brand/list',
+         rownumWidth:60,
+         colModel: [{
+             label: 'id', name: 'id', index: 'id', key: true, hidden: true
+         }, {
+             label: '店铺名称', name: 'name', index: 'name', width: 80
+         },
+         {
+             label: '类型', name: 'type', index: 'type', width: 80,formatter: function (value) {
+                 return types[value] || '-'
+             }
+         }, 
+         {
+             label: '场景地址', name: 'sceneUrl', index: 'scene_url', width: 140
+         }, 
+         {
+             label: '店铺封面',align:'center', name: 'listPicUrl', index: 'list_pic_url', width: 120, formatter: function (value) {
+                 return transImg(value,100,'auto');
+             }
+         },
+         {
+             label: '分享图', align:'center', name: 'newPicUrl', index: 'new_pic_url', width: 120, formatter: function (value) {
+                 return transImg(value,100,'auto');
+             }
+         },
+         //  {
+         //     label: '描述', name: 'simpleDesc', index: 'simple_desc', width: 80
+         // }, 
+  
+     
+         
+         // {
+         //     label: '缩略图', align:'center',name: 'picUrl', index: 'pic_url', width: 120, formatter: function (value) {
+         //         return transImg(value,100,'auto');
+         //     }
+         // }, 
+         {
+             label: '排序', name: 'sortOrder', index: 'sort_order', width: 80
+         }, 
+         {
+             label: '显示', name: 'isShow', index: 'is_show', width: 80, formatter: function (value) {
+                 return transIsNot(value)
+             }
+         },
+         //  {
+         //     label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 80
+         // }, 
+         // {
+         //     label: '封面图',align:'center', name: 'appListPicUrl', index: 'app_list_pic_url', width: 120, formatter: function (value) {
+         //         return transImg(value,100,'auto');
+         //     }
+         // },
+         //  {
+         //     label: '新店铺', name: 'isNew', index: 'is_new', width: 80, formatter: function (value) {
+         //         return transIsNot(value)
+         //     }
+         // },
+         
+         // {
+         //     label: '新店铺排序', name: 'newSortOrder', index: 'new_sort_order', width: 80
+         // }
+     ]
+     });
+  });
+  
+  
+  const validateSceneUrlCheck = function (rule, value, callback){
+     console.log(value)
+     var link1 ='https://test.4dkankan.com/eShopMobile.html?m='
+     var link2 ='https://www.4dkankan.com/eShopMobile.html?m='
+  
+     if (value === ''||!value) {
+         callback(new Error('场景地址不能为空'));
+     } else if(!~value.indexOf(link1)&&!~value.indexOf(link2)){
+         callback(new Error('场景地址需为'+link2+'或'+link1));
+     } else {
+         callback();
+     }
+  };
+  
+  var vm = new Vue({
+     el: '#rrapp',
+     data: {
+         showList: true,
+         title: null,
+         brand: {listPicUrl: '',type:0, picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
+         ruleValidate: {
+             name: [
+                 {required: true, message: '店铺名称不能为空', trigger: 'blur'}
+             ],
+             listPicUrl: [
+                 {required: true, message: '图片不能为空', trigger: 'blur'}
+             ],
+             simpleDesc: [
+                 {required: true, message: '描述不能为空', trigger: 'blur'}
+             ],
+            //  sceneUrl: [
+            //      {required: true, validator: validateSceneUrlCheck, trigger: 'blur'}
+            //  ],
+             picUrl: [
+                 {required: true, message: '缩略图不能为空', trigger: 'blur'}
+             ]
+         },
+         q: {
+             name: '',
+             type:''
+         },
+         typeList:[
+             {
+                 id:0,
+                 name:'其他'
+             },
+             {
+                 id:1,
+                 name:'生活'
+             },
+             {
+                 id:2,
+                 name:'文化'
+             },
+             {
+                 id:3,
+                 name:'工业'
+             },
+         ],
+        phoneNum: "",
+        password: "",
+        index:''
+     },
+     methods: {
+          addSceneLink: function () {
+           
+              openWindow({
+                title: "四维看看账号",
+                area: ['400px', '400px'],
+                content: jQuery("#loginLayer")
             });
-        },
-        del: function (event) {
-            var ids = getSelectedRows("#jqGrid");
-            if (ids == null) {
-                return;
-            }
-
-            confirm('确定要删除选中的记录?', function () {
-
-                Ajax.request({
-                    type: "POST",
-                    url: "../brand/delete",
-                    contentType: "application/json",
-                    params: JSON.stringify(ids),
-                    successCallback: function () {
-                        alert('操作成功', function (index) {
-                            vm.reload();
-                        });
-                    }
-                });
-            });
-        },
-        getInfo: function (id) {
-            Ajax.request({
-                url: "../brand/info/" + id,
-                async: true,
-                successCallback: function (r) {
-                    vm.brand = r.brand;
-                }
-            });
-        },
-        reload: function (event) {
-            vm.showList = true;
-            var page = $("#jqGrid").jqGrid('getGridParam', 'page');
-            $("#jqGrid").jqGrid('setGridParam', {
-                postData: {'name': vm.q.name,'type': vm.q.type},
-                page: page
-            }).trigger("reloadGrid");
-            vm.handleReset('formValidate');
-        },
-        handleSuccessListPicUrl: function (res, file) {
-            vm.brand.listPicUrl = file.response.url;
-            vm.brand.appListPicUrl = file.response.url;
-        },
-        handleSuccessPicUrl: function (res, file) {
-            vm.brand.picUrl = file.response.url;
-        },
-        handleSuccessAppListPicUrl: function (res, file) {
-            vm.brand.appListPicUrl = file.response.url;
-        },
-        handleSuccessNewPicUrl: function (res, file) {
-            vm.brand.newPicUrl = file.response.url;
-        },
-        handleFormatError: function (file) {
-            this.$Notice.warning({
-                title: '文件格式不正确',
-                desc: '文件 ' + file.name + ' 格式不正确,请上传 jpg 或 png 格式的图片。'
-            });
-        },
-        handleMaxSize: function (file) {
-            this.$Notice.warning({
-                title: '超出文件大小限制',
-                desc: '文件 ' + file.name + ' 太大,不能超过 2M。'
-            });
-        },
-        eyeImageListPicUrl: function () {
-            var url = vm.brand.listPicUrl;
-            eyeImage(url);
-        },
-        eyeImagePicUrl: function () {
-            var url = vm.brand.picUrl;
-            eyeImage(url);
-        },
-        eyeImageAppListPicUrl: function () {
-            var url = vm.brand.appListPicUrl;
-            eyeImage(url);
-        },
-        eyeImageNewPicUrl: function () {
-            var url = vm.brand.newPicUrl;
-            eyeImage(url);
-        },
-        handleSubmit: function (name) {
-            handleSubmitValidate(this, name, function () {
-                vm.saveOrUpdate()
-            });
-        },
-        handleReset: function (name) {
-            handleResetForm(this, name);
+         },
+         query: function () {
+             vm.reload();
+         },
+         add: function () {
+             vm.showList = false;
+             vm.title = "新增";
+             vm.brand = {listPicUrl: '',type:0,sceneUrl:'', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0};
+         },
+         update: function (event) {
+             var id = getSelectedRow("#jqGrid");
+             if (id == null) {
+                 return;
+             }
+             vm.showList = false;
+             vm.title = "修改";
+  
+             vm.getInfo(id)
+         },
+         saveOrUpdate: function (event) {
+             var url = vm.brand.id == null ? "../brand/save" : "../brand/update";
+             Ajax.request({
+                 type: "POST",
+                 url: url,
+                 contentType: "application/json",
+                 params: JSON.stringify(vm.brand),
+                 successCallback: function () {
+                     alert('操作成功', function (index) {
+                         vm.reload();
+                     });
+                 }
+             });
+         },
+         del: function (event) {
+             var ids = getSelectedRows("#jqGrid");
+             if (ids == null) {
+                 return;
+             }
+  
+             confirm('确定要删除选中的记录?', function () {
+  
+                 Ajax.request({
+                     type: "POST",
+                     url: "../brand/delete",
+                     contentType: "application/json",
+                     params: JSON.stringify(ids),
+                     successCallback: function () {
+                         alert('操作成功', function (index) {
+                             vm.reload();
+                         });
+                     }
+                 });
+             });
+         },
+         getInfo: function (id) {
+             Ajax.request({
+                 url: "../brand/info/" + id,
+                 async: true,
+                 successCallback: function (r) {
+                     vm.brand = r.brand;
+                 }
+             });
+         },
+         reload: function (event) {
+             vm.showList = true;
+             var page = $("#jqGrid").jqGrid('getGridParam', 'page');
+             $("#jqGrid").jqGrid('setGridParam', {
+                 postData: {'name': vm.q.name,'type': vm.q.type},
+                 page: page
+             }).trigger("reloadGrid");
+             vm.handleReset('formValidate');
+         },
+         handleSuccessListPicUrl: function (res, file) {
+             vm.brand.listPicUrl = file.response.url;
+             vm.brand.appListPicUrl = file.response.url;
+         },
+         handleSuccessPicUrl: function (res, file) {
+             vm.brand.picUrl = file.response.url;
+         },
+         handleSuccessAppListPicUrl: function (res, file) {
+             vm.brand.appListPicUrl = file.response.url;
+         },
+         handleSuccessNewPicUrl: function (res, file) {
+             vm.brand.newPicUrl = file.response.url;
+         },
+         handleFormatError: function (file) {
+             this.$Notice.warning({
+                 title: '文件格式不正确',
+                 desc: '文件 ' + file.name + ' 格式不正确,请上传 jpg 或 png 格式的图片。'
+             });
+         },
+         handleMaxSize: function (file) {
+             this.$Notice.warning({
+                 title: '超出文件大小限制',
+                 desc: '文件 ' + file.name + ' 太大,不能超过 2M。'
+             });
+         },
+         eyeImageListPicUrl: function () {
+             var url = vm.brand.listPicUrl;
+             eyeImage(url);
+         },
+         eyeImagePicUrl: function () {
+             var url = vm.brand.picUrl;
+             eyeImage(url);
+         },
+         eyeImageAppListPicUrl: function () {
+             var url = vm.brand.appListPicUrl;
+             eyeImage(url);
+         },
+         eyeImageNewPicUrl: function () {
+             var url = vm.brand.newPicUrl;
+             eyeImage(url);
+         },
+         handleSubmit: function (name) {
+             handleSubmitValidate(this, name, function () {
+                 vm.saveOrUpdate()
+             });
+         },
+         handleReset: function (name) {
+             handleResetForm(this, name);
+         }
+     },
+    mounted () {
+      window.addEventListener('message', function(e) {
+          var data = e.data;
+          console.log(data);
+          if (data==='close') {
+            layer.closeAll()
         }
+          
+          if (data.website) {
+            vm.brand.sceneUrl = data.website || ''
+            console.log(vm.brand.sceneUrl);
+            layer.closeAll()
+          }
+      }, false);
     }
-});
+  });

+ 0 - 1
js/shop/goods.js

@@ -744,7 +744,6 @@ var vm = new Vue({
                 btn1: function (index) {
                     var node = ztree.getSelectedNodes();
                     //选择上级菜单
-                   
                     if (node[0].children) {
                         alert('请选择商品类型', function () {
                         });