Csy817 6 years ago
parent
commit
d8dc59c3b5
4 changed files with 9 additions and 6 deletions
  1. 1 1
      public/index.html
  2. 2 2
      src/App.js
  3. 5 2
      src/pages/home/all/index.js
  4. 1 1
      src/pages/my/tools/address/index.js

+ 1 - 1
public/index.html

@@ -23,7 +23,7 @@
       work correctly both with client-side routing and a non-root public URL.
       Learn how to configure a non-root public URL by running `npm run build`.
     -->
-    <title>e-Commerce</title>
+    <title>微信商城</title>
   </head>
   <body>
     <noscript>You need to enable JavaScript to run this app.</noscript>

+ 2 - 2
src/App.js

@@ -95,8 +95,8 @@ class App extends Component {
         }else if(!user_id){
             request(graphqlFC, find_user_by_openid ,{openid})
                 .then(data => {
-                    // console.log('find user data',data)
-                    if(data.userbyprops[0].id){
+                    console.log('find user data',data)
+                    if(data.userbyprops.length){
                         let id = data.userbyprops[0].id
                         setCookie('user_id',id)
                     }else {

+ 5 - 2
src/pages/home/all/index.js

@@ -11,7 +11,10 @@ class All extends Component {
     constructor(props) {
         super(props)
         this.state = {
-            data: ['AiyWuByWklrrUDlFignR', 'TekJlZRVCjLFexlOCuWn', 'IJOtIlfsYdTyaDTRVrLI']
+            data: ['https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/ecslider1.jpg',
+                'https://zos.alipayobjects.com/rmsportal/AiyWuByWklrrUDlFignR.png',
+                'https://zos.alipayobjects.com/rmsportal/TekJlZRVCjLFexlOCuWn.png',
+                'https://zos.alipayobjects.com/rmsportal/IJOtIlfsYdTyaDTRVrLI.png']
         }
     }
 
@@ -48,7 +51,7 @@ class All extends Component {
                             }}
                         >
                             <img
-                                src={`https://zos.alipayobjects.com/rmsportal/${val}.png`}
+                                src={val}
                                 alt=""
                                 style={{width: '100%', verticalAlign: 'top'}}
                             />

+ 1 - 1
src/pages/my/tools/address/index.js

@@ -182,7 +182,7 @@ class AddressRender extends Component {
                                         <div className='address-info' onClick={() => this.changeOrdersAddress(address)}>
                                             <Row className='address-username-telephone'>
                                                 <Col span={6} className='address-username ellipsis'>{address.username}</Col>
-                                                <Col span={14} className='address-phone ellipsis'>
+                                                <Col span={18} className='address-phone ellipsis'>
                                                     {address.telephone}&nbsp;&nbsp;
                                                     {address.default ?
                                                         <span className='address-label'>默认</span>:''