|
|
@@ -1092,18 +1092,31 @@ define(['app/app'], function (app) {
|
|
|
$scope.chooseModal = function (modal) {
|
|
|
$scope.modalTempData.rateContent = modal.rateTemplateContent;
|
|
|
$scope.modalTempData.modalTitle = modal.rateTemplateName;
|
|
|
+ $scope.currentModal = modal;
|
|
|
$scope.showModalListFlag = false;
|
|
|
}
|
|
|
|
|
|
//保存模板
|
|
|
$scope.modalTempData = {};
|
|
|
$scope.saveModal = function () {
|
|
|
- Rate.saveRateTemplate({storeuuid: $scope.rateContent.storeid},{rateTemplateName: $scope.modalTempData.modalTitle, rateTemplateContent: $scope.modalTempData.rateContent}, function (data) {
|
|
|
- toaster.pop('success', '保存成功');
|
|
|
- $state.reload();
|
|
|
- }, function (error) {
|
|
|
- toaster.pop('error', '保存失败');
|
|
|
- })
|
|
|
+ //storeuuid: $scope.rateContent.storeid
|
|
|
+ if ($scope.boxStatus == 4) {
|
|
|
+ $scope.currentModal.rateTemplateContent = $scope.modalTempData.rateContent;
|
|
|
+ $scope.currentModal.rateTemplateName = $scope.modalTempData.modalTitle;
|
|
|
+ Rate.saveRateTemplate({storeuuid: $scope.rateContent.storeid},$scope.currentModal, function (data) {
|
|
|
+ toaster.pop('success', '保存成功');
|
|
|
+ $state.reload();
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop('error', '保存失败');
|
|
|
+ })
|
|
|
+ } else if ($scope.boxStatus == 3) {
|
|
|
+ Rate.saveRateTemplate({storeuuid: $scope.rateContent.storeid},{rateTemplateName: $scope.modalTempData.modalTitle, rateTemplateContent: $scope.modalTempData.rateContent}, function (data) {
|
|
|
+ toaster.pop('success', '保存成功');
|
|
|
+ $state.reload();
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop('error', '保存失败');
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//提交评论
|