|
@@ -16,7 +16,7 @@ class InstallService extends CrudService {
|
|
|
await this.initDict();
|
|
|
await this.initAdmin();
|
|
|
await this.initSelfShop();
|
|
|
- await this.initTestCustomer();
|
|
|
+ // await this.initTestCustomer();
|
|
|
await this.initGoodsTags();
|
|
|
}
|
|
|
|
|
@@ -41,11 +41,12 @@ class InstallService extends CrudService {
|
|
|
*/
|
|
|
async initTestCustomer() {
|
|
|
const model = this.ctx.model.User.User;
|
|
|
- const num = await model.count({ code: 'self' });
|
|
|
- if (num > 0) return;
|
|
|
- const p = path.resolve(this.dataIndex, 'user.js');
|
|
|
- const data = require(p);
|
|
|
- await model.create(data);
|
|
|
+ await model.deleteMany({ name: '测试用户', phone: '11111111111' });
|
|
|
+ // const num = await model.count({ code: 'self' });
|
|
|
+ // if (num > 0) return;
|
|
|
+ // const p = path.resolve(this.dataIndex, 'user.js');
|
|
|
+ // const data = require(p);
|
|
|
+ // await model.create(data);
|
|
|
}
|
|
|
|
|
|
|