maguohua před 7 roky
rodič
revize
b276e000cb
7 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. binární
      .DS_Store
  2. 3 1
      .gitignore
  3. 1 1
      models/shopping/shop.js
  4. 1 1
      mongodb/db.js
  5. binární
      prototype/16018a6492334.jpeg
  6. 1 1
      prototype/addressComponent.js
  7. binární
      public/.DS_Store

binární
.DS_Store


+ 3 - 1
.gitignore

@@ -1,3 +1,5 @@
 npm-debug.log
 node_modules
-coverage
+coverage
+package-lock.json
+public/img/

+ 1 - 1
models/shopping/shop.js

@@ -72,7 +72,7 @@ const shopSchema = new mongoose.Schema({
 	}],
 });
 
-shopSchema.index({ id: 1 });
+shopSchema.index({ id: 1 }); //primary_key 主键
 
 const Shop = mongoose.model('Shop', shopSchema);
 

+ 1 - 1
mongodb/db.js

@@ -8,7 +8,7 @@ mongoose.Promise = global.Promise;
 const db = mongoose.connection;
 
 db.once('open' ,() => {
-	console.log('连接数据库成功')
+	console.log('连接数据库成功');
 })
 
 db.on('error', function(error) {

binární
prototype/16018a6492334.jpeg


+ 1 - 1
prototype/addressComponent.js

@@ -23,7 +23,7 @@ class AddressComponent extends BaseComponent {
 	 		const ipArr = ip.split(':');
 	 		ip = ipArr[ipArr.length -1];
 	 		if (process.env.NODE_ENV == 'development') {
-	 			ip = '116.226.184.83';
+	 			ip = '220.249.123.162';
 	 		}
 	 		try{
 	 			let result;

binární
public/.DS_Store