修改部署页面

pull/30/head
陶士涵 4 years ago
parent 39b67080f7
commit 30c184002c

@ -156,7 +156,7 @@
_this.mysql.port=result.Port;
});
}
if(ACTION=="setting_kefu_list"||ACTION=="setting_deploy"){
if(ACTION=="setting_kefu_list"){
this.sendAjax("/kefulist","get",{},function(result){
_this.kefuList=result;
});

@ -7,18 +7,28 @@
</el-aside>
<el-main class="mainMain">
<el-form :model="kefuForm" :rules="rules" ref="kefuForm" label-width="120px">
<el-form-item label="选择客服" prop="name">
<el-select v-model="kefuForm.name" placeholder="请选择客服">
<el-option :label="item.name" :value="item.name" v-for="item in kefuList" v-bind:key="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="createDeployJs">立即生成</el-button>
</el-form-item>
</el-form>
<el-tabs>
<el-tab-pane label="HTML模式">
<textarea style="width:100%;color:green;font-size:12px;height:290px;">
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script>
<link href="https://gofly.sopans.com/static/css/gofly-front.css" rel="stylesheet" type="text/css"/>
<div id="launchButton" class="launchButton">
<svg x="0px" y="0px" viewBox="0 0 27 21.9" aria-labelledby="title desc" role="img" class="xhl-launch-button-svg"><title>Chat Icon </title><desc>three small dots to indicate that an agent is available to chat</desc><path fill="#ffffff" d="M23.2,0L2.6,1.7C1,1.9,0,3.2,0,4.9v8c0,1.6,0.8,3,2.4,3.1l5.3,0.5c0,0,1,1.6,0.3,3.2C7.2,21.3,6,21.9,6,21.9 c4.2,0,6.6-3.1,7.8-4.9l9.4,0.7c1.8,0.2,3.8-1.3,3.8-3.1V3.1C27,1.3,25-0.1,23.2,0z M6.4,10.1c-0.9,0-1.7-0.7-1.7-1.7 c0-0.9,0.7-1.7,1.7-1.7C7.3,6.8,8,7.5,8,8.5C8,9.4,7.3,10.1,6.4,10.1z M13.2,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C14.8,9.4,14.1,10.1,13.2,10.1z M19.9,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C21.6,9.4,20.9,10.1,19.9,10.1z"></path></svg>
<div class="launchButtonText">
Chat with us
</div>
</div>
<script>
var GOFLY_URL="https://gofly.sopans.com";
</script>
<script src="https://gofly.sopans.com/static/js/gofly-front.js"></script>
</textarea>
</el-tab-pane>
<el-tab-pane label="超链接模式">
<el-input value="https://gofly.sopans.com/chat_page?kefu_id=[客服用户名]"></el-input>
</el-tab-pane>
</el-tabs>
</el-main>
</el-container>

@ -0,0 +1,27 @@
package tools
//划分
func partition(arr *[]int,left int,right int)int{
privot:=(*arr)[right]
i:=left-1
for j:=left;j<right;j++{
if (*arr)[j]<privot{
i++
temp:=(*arr)[i]
(*arr)[i]=(*arr)[j]
(*arr)[j]=temp
}
}
temp:=(*arr)[i+1]
(*arr)[i+1]=(*arr)[right]
(*arr)[right]=temp
return i+1
}
//递归
func QuickSort(arr *[]int,left int,right int){
if left>= right{
return
}
privot:=partition(arr,left,right)
QuickSort(arr,left,privot-1)
QuickSort(arr,privot+1,right)
}

@ -0,0 +1,12 @@
package tools
import (
"testing"
)
func TestQuickSort(t *testing.T) {
arr:=[]int{1,8,3,9,4,5,4,7}
t.Log(arr)
QuickSort(&arr,0,len(arr)-1)
t.Log(arr)
}
Loading…
Cancel
Save