|
|
@@ -13837,11 +13837,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.editstatus = false;
|
|
|
var loadData = function () {
|
|
|
GetProductInfo.getSaleProduct({id: $stateParams.id}, function (data) {
|
|
|
- if (data.attach) {
|
|
|
- GetProductInfo.getAttach({id: data.attach.id}, function (data) {
|
|
|
- $scope.imgPreview = data.url;
|
|
|
- $scope.previewShow = true;
|
|
|
- });
|
|
|
+ if (data.attachment) {
|
|
|
+ $scope.imgPreview = data.attachment;
|
|
|
+ $scope.previewShow = true;
|
|
|
}
|
|
|
$scope.prodInfo = data;
|
|
|
if ($scope.prodInfo.isbusiness == 0) {
|
|
|
@@ -13993,7 +13991,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 删除
|
|
|
$scope.clearfile = function () {
|
|
|
- $scope.prodInfo.attach = null;
|
|
|
+ $scope.prodInfo.attachment = null;
|
|
|
$scope.myFiles = null;
|
|
|
$scope.previewShow = false;
|
|
|
}
|
|
|
@@ -14093,18 +14091,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 查看范例
|
|
|
$scope.showImg = function () {
|
|
|
- if ($scope.prodInfo.attach) {
|
|
|
- GetProductInfo.getAttach({id: $scope.prodInfo.attach.id}, function (data) {
|
|
|
- $scope.imgPreview = data.url;
|
|
|
- var src = data.url, box = $('#image-box');
|
|
|
- box.show();
|
|
|
- box.find('img').attr('src', src);
|
|
|
- box.find('a').click(function () {
|
|
|
- box.hide();
|
|
|
- });
|
|
|
- box.dblclick(function () {
|
|
|
- box.hide();
|
|
|
- });
|
|
|
+ if ($scope.prodInfo.attachment) {
|
|
|
+ $scope.imgPreview = $scope.prodInfo.attachment;
|
|
|
+ var src = $scope.prodInfo.attachment, box = $('#image-box');
|
|
|
+ box.show();
|
|
|
+ box.find('img').attr('src', src);
|
|
|
+ box.find('a').click(function () {
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ box.dblclick(function () {
|
|
|
+ box.hide();
|
|
|
});
|
|
|
$scope.previewShow = true;
|
|
|
} else if (imgurl != null) {
|