diff --git a/src/components/paymentMethod.vue b/src/components/paymentMethod.vue
index 579220e..8ac2009 100644
--- a/src/components/paymentMethod.vue
+++ b/src/components/paymentMethod.vue
@@ -14,7 +14,7 @@
-
+
@@ -46,8 +46,7 @@ export default {
},
},
methods:{
- onSwitchChange(data){
- data.status = data.status === 1 ? 0 : 1;
+ onSwitchChange(){
this.$emit('confirm', this.list)
},
onEnd() {
diff --git a/src/components/site/addSiteStep/step1.vue b/src/components/site/addSiteStep/step1.vue
index cee02ec..38c2396 100644
--- a/src/components/site/addSiteStep/step1.vue
+++ b/src/components/site/addSiteStep/step1.vue
@@ -43,7 +43,7 @@
-
-
+
+
-
{{ scope.row.type == 'a' ? '查重服务' : '写作辅助'
- }}
-
{{ scope.row.name }}
+
+
+
{{ scope.row.type_desc }}
@@ -55,14 +55,13 @@
-
-
+
输入>0的数,越小排序越前;重复则新者优先;0则默认排序
取消
@@ -102,16 +101,18 @@
-
+
-
-
- 编辑
- 删除
-
+
+
+
+ 编辑
+ 删除
+
+
@@ -125,14 +126,19 @@
+
+
+ 确定要移除服务吗?
+
-
@@ -148,9 +154,15 @@ import {getServicePriceDesc} from "@/utils/common";
import PaymentMethod from "@/components/paymentMethod.vue";
import GuipDialog from "@/components/GuipDialog.vue";
import PromptText from "@/components/PromptText.vue";
+import page from "@/components/Page.vue";
export default {
name: 'domainSet',
+ computed: {
+ page() {
+ return page
+ }
+ },
props: {
siteInfo: {
type: Object,
@@ -169,7 +181,7 @@ export default {
serviceList:[],
tableLoading:false,
currentPage: 1, //当前页
- pageSize: 2, //每页的容量
+ pageSize: 8, //每页的容量
total: 0, //列表总数
//支付方式
payList: [],
@@ -179,9 +191,14 @@ export default {
dialogVisible: false, //是否展示弹框
dialogTitle: "", //弹框标题
editRow:{},
+ //删除二次确认
+ dialogDelConfim: false,
+ delRow:{},
// 服务列表url
serviceAddUrl: '/agent/siteAddFinally',
+ // 站点设置url
+ serviceEditUrl: '/agent/siteServiceEdit',
}
},
mounted() {
@@ -202,8 +219,25 @@ export default {
},
nextStep(){
//保存数据
+ var data = {
+ uid: this.siteInfo.uid,
+ }
- this.$emit('handelStep', 4)
+ this.$http('POST', '/agentnew/ajax_add_new_site_complete', data, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ this.$nextTick(() => {
+ if (response.status) {
+ this.$emit('handelStep', 4)
+ return true;
+ }
+ this.$Message.error(response.info);
+ })
+ }).catch(error => {
+ console.error(error, 'error')
+ })
},
// 获取服务列表
getSiteServiceList() {
@@ -218,14 +252,15 @@ export default {
}
}).then(response => {
that.tableLoading = false
- that.$nextTick(() => {
- that.serviceList = response.data.service_list
- })
+ if(response.status && response.data.service_list.length>0){
+ that.$nextTick(() => {
+ that.serviceList = response.data.service_list
+ })
+ }
}).catch(error => {
console.error(error, 'error')
})
},
-
handleSizeChange(val) {
this.pageSize = val
},
@@ -235,7 +270,38 @@ export default {
serviceAdd(prodid){
this.$router.push(this.serviceAddUrl + '?uid=' + this.siteInfo.uid + '&prodid=' + prodid)
},
-
+ //删除
+ handleDelClick(row, index) {
+ this.dialogDelConfim = true
+ this.delRow.index = index
+ this.delRow.type = row.type
+ },
+ handleDelCancel(){
+ this.dialogDelConfim = false
+ },
+ handleDelConfirm(){
+ const that = this
+ this.dialogDelConfim = false
+ this.$http('POST', '/agentnew/ajax_del_service', {
+ uid: that.siteInfo.uid,
+ type: that.delRow.type
+ },{
+ headers:{
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if(response.status){
+ that.$message.success('删除成功');
+ this.$nextTick(() => {
+ that.serviceList.splice(that.delRow.index, 1);
+ })
+ return true;
+ }
+ that.$message.error(response.info);
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
// 点击价格单元格时触发
handleEditClick(row, index, type) {
// 关闭其他行的弹框
@@ -292,13 +358,11 @@ export default {
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num);
},
async onSwitchChange(row){
- console.log(row)
let obj = {}
obj.uid = this.siteInfo.uid
obj.type = row.type
obj.is_index_display = row.is_index_display
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
- console.log(res)
if(!res) row.is_index_display = row.is_index_display === "1" ? "0" : "1"
},
async saveSort(row){
@@ -308,8 +372,9 @@ export default {
obj.sort_id = row.sort_id
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
if(res) {
- row.sort_id = row.edit_sort_id;
this.sortServiceList()
+ }else{
+ this.getSiteServiceList()
}
},
sortServiceList() {
@@ -393,7 +458,6 @@ export default {
});
obj.info = obj.info.substr(1, obj.info.length-1);
- await this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
const res = await this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
if(res && hasClose) {
this.editRow.payment_method_desc = '自定义支付';
@@ -438,4 +502,28 @@ export default {
margin-left: 0 !important;
transform: none !important;
}
+.green,
+.blue {
+ width: 80px;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ color: #0DAF49 !important;
+ letter-spacing: 0.08em;
+ /* 基本 */
+ width: 80px;
+ border-radius: 4px;
+ background: rgba(239, 255, 224, 0.5);
+ box-sizing: border-box;
+ border: 1px solid rgba(0, 194, 97, 0.6);
+ margin-right: 8px;
+}
+
+.blue {
+ background: #F2F7FF;
+ border: 1px solid #BFDAFF;
+ color: #006AFF !important;
+}
\ No newline at end of file
diff --git a/src/components/site/serviceSetting/showSet.vue b/src/components/site/serviceSetting/showSet.vue
index 4253d10..1bbc807 100644
--- a/src/components/site/serviceSetting/showSet.vue
+++ b/src/components/site/serviceSetting/showSet.vue
@@ -50,8 +50,8 @@
控制首页是否显示本服务